Full Version : Making an NPC face the trigger (Dialog)?
xmlspawner >>Q&A >>Making an NPC face the trigger (Dialog)?
<< Prev | Next >>
Discord- 06-23-2006
I have a quest npc that triggers some pleading on the approach of a hearty hero(ess) - I even got her to bow.. Unfortunately, I cannot figure out how to get her to face the trigger (in this case a player) she is pleading with.
ArteGordon- 06-24-2006
to change the facing of an npc, set the Direction property.
In order to make it face the triggering player, you would first have to determine the relative location of the player.
I would set up a triggered spawner next to your questnpc that did a series of tests like. Set it to SpawnOnTrigger and whenever the player moves, it should change the mobs facing.
subgroup 1: #CONDITION,GETONTRIGMOB,x > GETONMOB,mobname,x & GETONTRIGMOB,y > GETONMOB,mobname,y ; SETONMOB,mobname,xmlquestnpc/Direction/1
subgroup 1: #CONDITION,GETONTRIGMOB,x > GETONMOB,mobname,x & GETONTRIGMOB,y < GETONMOB,mobname,y ; SETONMOB,mobname,xmlquestnpc/Direction/3
...
...