Full Version : Spawn a mobile at the location of the...
xmlspawner >>Q&A >>Spawn a mobile at the location of the...
<< Prev | Next >>
godfood- 12-29-2005
Hey arte, How do I spawn a mobile at the location of the player triggering it? Secondly, is there a way to tell a mobile to start attacking as soon as it is spawned rather than wait for it to "see" the player?
ArteGordon- 12-29-2005
you would set the Location property of the mob to the Location property of the triggering char with
orc/Location/GETONTRIGMOB,Location
and if you wanted it to go into combat immediately, you would set the Combatant property to point to the triggering char, and then put it into warmode
orc/Location/GETONTRIGMOB,Location/Combatant/TRIGMOB/warmode/true
The sphynx.npc file also has an example of this (if you get the question wrong you get immediately attacked).
godfood- 12-29-2005
Thanks Arte
ArteGordon- 12-29-2005
added a new HowTo related to the topic
How Do I - Spawn a mob that immediately attacks a char?
Vix- 01-09-2006
Ok. so how would i go about spawning a small custom town with one spawner.. like a npc for each area... like the tailor set to spawn in the tailor shop. but all the npcs in their shops from one spawner....... ( npc to spawn in acertain location)
ArteGordon- 01-09-2006
just have multiple entries of the sort
banker/location/(x,y,z)/home/(x,y,z)
tailor/location/(x,y,z)/home/(x,y,z)
etc.
where you assign each npc their own coordinates. You could also do it so that you just set the home, then they would spawn randomly within the spawnrange of the spawner and then wander to their home location
banker/home/(x,y,z)
tailor/home/(x,y,z)
etc.