I would like hostile NPCS to speak a quick barkstring when they see the pc. What's an easy way to do this? I assum there must be a variable I can use that's associated with the default scripts.
NW_FLAG_SPECIAL_COMBAT_CONVERSATION
Débuté par
Batmanis64
, févr. 20 2011 01:30
#1
Posté 20 février 2011 - 01:30
#2
Posté 20 février 2011 - 04:39
Would be rather simple to do this via making a custom OnPerception script. Are the hostile NPCs around any other NPCs from another faction? Commoners or whatever?
#3
Posté 20 février 2011 - 09:01
The hostile PCs are not around any commoners, just other hostiles. I can definitely make a custom script, I was just wondering if there was already a built-in variable, like the title of this post suggests, although I can't find the actual location of that constant so I can try it out.
#4
Guest_ElfinMad_*
Posté 20 février 2011 - 09:22
Guest_ElfinMad_*
I haven't tested but I had a bit of a dig cause I want to do a similar thing. To get this to work I think you just need to put a line into your default spawn in script:
SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
Just make up your own variable to make this line conditional, doesn't matter if there is one already (I couldnt see one defined anywhere).
x0_i0_spawncond is where the flags and functions are defined if you want a closer look.
Then you need a one line convo (NPC node only) attached to the creature and the default on perceive script should do the rest.
SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
Just make up your own variable to make this line conditional, doesn't matter if there is one already (I couldnt see one defined anywhere).
x0_i0_spawncond is where the flags and functions are defined if you want a closer look.
Then you need a one line convo (NPC node only) attached to the creature and the default on perceive script should do the rest.
#5
Posté 21 février 2011 - 12:36
ElfinMad wrote...
I haven't tested but I had a bit of a dig cause I want to do a similar thing. To get this to work I think you just need to put a line into your default spawn in script:
SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
Just make up your own variable to make this line conditional, doesn't matter if there is one already (I couldnt see one defined anywhere).
x0_i0_spawncond is where the flags and functions are defined if you want a closer look.
Then you need a one line convo (NPC node only) attached to the creature and the default on perceive script should do the rest.
I've done something like this before; the only reason I didn't go with it was because it was for a PW and I didn't want it firing repeatedly if a party is perceived.
There's no need to SetSpawnInCond through a script, though. You can just set a variable on the blueprint. I think you'll want int var "NW_GENERIC_MASTER" = 1 (which is NW_FLAG_SPECIAL_CONVERSATION).





Retour en haut






