Full Version : Deleting a spawned tame
xmlspawner >>Q&A >>Deleting a spawned tame
<< Prev | Next >>
DazedAndConfused- 04-24-2007
I have a spawner that spawns a creature already tamed. Is there a way to have (probably a second spawner) delete that spawned tame after a certain period?
Xarlon- 04-26-2007
You could set a Duration timer on the spawner... or the DespawnTime
Of course, these would effect everything on the spawner.
ArteGordon- 04-27-2007
the problem is that as soon as a creature is tamed, it is removed from spawner control, so the spawner simply doesnt normally know about it any longer.
You could always use a spawner to just delete tamed creatures within a certain range that didnt have control masters, but if you really wanted to just delete the specific spawned/tamed creature from a specific spawner regardless of where it was, it could also be done. You would need to keep track of the spawns serial number, and then explicitly delete it. I think something like this would work.
subgroup 1: horse
subgroup 1: #CONDITION,GET,{GETVAR,HorseSerial},controlmaster=(-null-) ; SET,{GETVAR,HorseSerial}/DELETE
subgroup 1:SETVAR,HorseSerial/{GETONSPAWN,1,serial}
subgroup 1:SETONSPAWN,1/controlled/true
this would spawn a creature, delete any previous creature that it had been keeping track of if it did not have a controlmaster, store the serial number of the new creature, and finally tame the creature (which will result in it being removed from the spawners control).
So on each spawner tick, the previously spawned creature will be removed and a new one added.
DazedAndConfused- 04-27-2007
hehe. Thanks Arte.