) First, build the NPCs conversation useing these guild lines.
+Root
[line1]NPC - "Say my greeting when I perceive a PC"
[line2]NPC - "Say my Battle cry if I'm attacked!"
[line3]NPC - "Start my normal conversation here."
NOTE: Line 1 and Line 2 CAN NOT have a PC response on them.
In
the convo editor, select line one. In the "Text Appears When" script
box, drop down the menu and select the script named "nw_d2_gen_check".
Click on line 2 and in the same "Text Appears When" script node, select
the script named "nw_d2_gen_combat". Make sure Line 1 is at the top, and
line 2 is just underneath. Save the convo.
Now, open the
properties for the NPC. Go to the Scripts TAB and click "Edit" in the
OnSpawn script. Uncomment (remove the 2 "//") these 2 lines,
SetSpawnInCondition( NW_FLAG_SPECIAL_CONVERSATION);
SetSpawnInCondition( NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
Resave the script with a new name and be sure it is attached to the NPCs OnSpawn script node.
The
NPC should say his greeting (line 1) when he sees a PC. He will repeat
this line each time a PC is perceived. If he is attacked, he should say
his combat saying (line 2).
NOTE: If the NPC is already a Hostile
creature, Line 1 should be a battle cry, something like "ATTACK!" or
"CHARGE!" as he will only say this once OnPerception. Line 2 will repeat
during combat.
Which is great if I simply wanted a monster to say something as a battle cry and then repeat another saying while in combat. What I need is the option to have a random pool of sayings that the mob could say.
Example:
Zombies that could say:
"Brainssssss"
"Uuuuuhhhhhnn"
"Brains!"
simple way to do this?





Retour en haut






