Full Version : Seq Spawn using timedlever
xmlspawner >>Q&A >>Seq Spawn using timedlever


<< Prev | Next >>

BH_- 09-11-2007
Hi, been trying to get this working for the past hour with little success, if anyone could offer any help it'd be appreciated.

I am trying to use a timedlever to activate a spawner that adds a wall at a certain x/y to block the passage out and then spawns a bunch of monsters in room, the wall should disappear after 1 minute but I want the monsters to remain until killed...

Ive tried doing this a bunch of different ways setting up several spawners activating each other, one with the walls on it with a despawn time on it, or putting everything on the one spawner and adding an entry WAITUNTIL,1 then trying to DESPAWN,1 to get rid of the walls which are in subgroup 1 but I just cant get it to work.. I cant seem to figure out how to use waituntil or despawn properly.

Thanks in advance.

ArteGordon- 09-11-2007
here is the easiest way that I can think of to do that.

Put the wall and the creatures on one spawner in the same subgroup and spawn them like this.


subgroup 1: static,1300/ATTACH/temporaryquestobject,temporarywall,1
subgroup 1: orc



The temporaryquestobject attachment will automatically delete the thing that it is attached to when it expires. The '1' sets the expiration time to 1 minute. The 'temporarywall' string can be anything. It is just a name given to the attachment.

One thing to note about DESPAWN is that it only works on entries that have the CLR (clear on advance) flag set.
from xmlspawner2.txt
QUOTE

-added the new standalone keyword "DESPAWN[,spawnername],subgroup" which can be used to remove all spawns from a particular subgroup on a particular spawner.  If the spawnername arg is omitted, then the current spawner will be used.  Note that DESPAWN will only remove spawns on entries that have the CLR flag set.  If you want to remove all spawns regardless of the CLR setting, then use the DELETE keyword like this "SETONSPAWN,subgroup/DELETE"

BH_- 09-11-2007
Thanks arte, I managed to get it working a few minutes ago by having a seperate spawner called with despawns after a short amount of time, not sure what i did differently to the last time, swear i tried it the same way before and it worked wink.gif

But reading over what you said looks like a much cleaner and easier way to do it so ill go and change it and mess around with it again in a moment.

Ive been trying to work out how WAITUNTIL works, how would you do something simple with it like the following...

subgroup 1: orc
subgroup 1: waituntil 1 minute
subgroup 2: despawn, 1

Thanks again.

ArteGordon- 09-11-2007
the issue you will have with this

subgroup 1: orc
subgroup 1: waituntil 1 minute
subgroup 2: despawn, 1

is that the DESPAWN,1 keyword will only work on spawns that have the CLR flag set. But if you have the CLR flag set on the orcs, they will be automatically removed anyway when the subgroup advances from 1 to 2 (that is what clear on advance means), so the DESPAWN is not really necessary.

If you really wanted to do it using this sequential strategy without using the automatic clear on advance feature, you could turn off the CLR flag on the orcs, and then use this in subgroup 2 instead

SETONSPAWN,1/DELETE

As for using WAITUNTIL, put it into its own subgroup to introduce a delay, like this

subgroup 1: orc
subgroup 2: WAITUNTIL,1
subgroup 3: SETONSPAWN,1/DELETE


This would spawn an orc, wait a minute, then delete the orc.

In principle, putting the WAITUNTIL into the same subgroup as the orc (the way you tried to do it) could work the same way. I will think about allowing that.

BH_- 09-11-2007
Thanks mate, thats a big help smile.gif