Bienvenue sur JeuxOnLine - MMO, MMORPG et MOBA !
Les sites de JeuxOnLine...
 

Panneau de contrôle

Recherche | Retour aux forums

JOL Archives

SetSpawnInCondition

Par Gargantuel le 2/8/2002 à 13:55:00 (#1898870)

Ca fait plusieurs fois que j'essaye de bien comprendre cette commande qui semble avoir un potentiel vraiment interressant.
Seul problème, j'y arrive pas.
Si l'un d'entre vous a bien compris et veut bien faire une explication, merci d'avance ...

La seule chose que j'ai bien compris ce sont les flags suivants :
NW_FLAG_*_EVENT

Il permettent de déclencher le script OnUserDefined lorsque l'evenement a lieu, en meme temps que le On* du meme nom. Exemple :

Dans le OnSpawn d'une créature :
SetSpawnInCondition(NW_FLAG_DEATH_EVENT);

Lorsque la créature meurt, le script OnUserDefined est lancé avec l'évent signal à 1007 et ce en meme temps qu'est déclenché le script OnDeath s'il existe.

Maintenant y a d'autres parametres comme NW_FLAG_DAY_NIGHT_POSTING qui m'ont l'air super interressantes mais qui me restent assez flou :(

Par Azharial del'Amrhyn le 2/8/2002 à 17:06:33 (#1900188)

Je ne me suis pas encore penché sur ce problème (et avec les vacances qui arrivent à grand pas, ca risque d'attendre un peu encore :p ), mais voici quelques commentaires du Gourou David Gaider au cas où tu ne les aurais pas encore lus :

// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// This causes the NPC to speak a single line from their dialogue file
// upon perceiving a player. Make sure that the line being spoken is at the
// very top of the NPC's other dialogue starting nodes and that you have
// placed the script "nw_d2_gen_check" in that line's 'Text Appears When' area.
// Do not use this flag for hostile creatures.
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This flag is similar to the above... except that it allows a hostile NPC
// to display a single line of dialogue before attacking. Put the line into the
// NPC's dialogue file as above, but place "nw_d2_gen_combat" into 'Text Appears When'
//SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// This sets up the NPC so that any NPC of a faction who is friendly to it
// who is attacked or attacks an enemy (and is using the generic AI) will issue a shout
// that this NPC will now listen and respond to.
//SetSpawnInCondition(NW_FLAG_STEALTH);
// If the NPC has Hide skill they will automatically be in Stealth Mode
// but only when the WalkWayPoints command is called (below)
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has the Search skill they are automatically in Search Mode
// but only when the WalkWayPoints command is called (below)
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
// This seperates the NPC's waypoints into night and day. Normally a waypoint prefix "WP"
// or "POST" would be used always. If this flag is set, those prefixes are used in the day
// and "WN" or "NIGHT" prefixes are used at night.
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// when the creature spawns in, it uses EffectAppear() instead of fading in
// but only if SetListeningPatterns is called (below)
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
// this causes the NPC to use common animations it possesses, and will appear more
// social if placed near a friendly NPC (they will turn to each other and use social animations)
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This is similar to the above, except that the creature will also move around randomly
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// to use 'escape', you need a waypoint the NPC will flee to with the tag "EXIT_" + the NPC's tag
// these commands can be activated in a script by calling ActivateFleeToExit(), "NW_IO_GENERIC" must be included
// for the escape commands that have 'return', the NPC will be re-spawned at it's starting location


Si je trouve autre chose de plus approfondi ce soir, je mets à la suite...

Par Chaco le 2/8/2002 à 17:27:49 (#1900341)

Merci ... cela me sera certainement utile aussi ...

Peux donner la source du post (pour vois les comments qui vont avec ...)

@++

Par Azharial del'Amrhyn le 2/8/2002 à 17:30:15 (#1900366)

Provient du message de Chaco
Peux donner la source du post (pour vois les comments qui vont avec ...)


C'est chez bioware tout simplement ;).

C'est aussi dans son tutorial .pdf que j'ai telechargé ce week-end quand j'ai commencé a essayer de scripter, et je dois dire qu'il est bien utile :).

JOL Archives 1.0.1
@ JOL / JeuxOnLine