Full Version : Subgroup troubles.
xmlspawner >>Q&A >>Subgroup troubles.


<< Prev | Next >>

Hale- 01-27-2008
Hey, I've got a spawner designed to trigger on a player, spawn NPCs, change the location of the player, then despawn the NPCs and turn off. Well when I have them all in one subgroup, it works flawlessly albeit super fast. I want the player to have time to realize what's happening and see the NPCs before they get carted off!

Here's what it looks like:

(Subgroup 1)

#PLAYER,3 ; freemeninfantry/frozen/true/combatant/TRIGMOB/warmode/true
SETONTRIGMOB/frozen/true
WAITUNTIL,5
GOTO/2

(Subgroup 2)

SETONTRIGMOB/LOCATION/(514,235,0)/SENDMSG/You've been arrested and transported to jail!
DESPAWN,Arrested,1
SETONTRIGMOB/frozen/false
SETONTHIS/running/false


Now, I've looked for some info on the time unit used by WAITUNTIL but I haven't found anything stating explicitly so I just assumed it's in seconds. So with this current configuration, It spawns the NPCs and sets the TRIGMOB frozen, but it stops there and doesn't complete Subgroup 2.

What's going on here?

Vladimir- 01-27-2008
QUOTE
- Added the WAITUNTIL[,duration][,timeout][/condition][/spawngroup] keyword that holds spawning and triggering until a given time elapses or a given condition is satisfied.
If called as "WAITUNTIL,duration" this essentially creates an empty spawn that will last for the specified duration in minutes.
If called as "WAITUNTIL/condition" it will hold further spawning until the condition is satisfied.
If called as "WAITUNTIL/condition/spawngroup" it will hold spawning until the condition is met, and then spawn the specified subgroup.
The timeout can be used to add in a safety release to prevent indefinite blocking of spawning if a condition may never be met.
If the duration is used in conjunction with a condition, then it will control the polling time (frequency with which the condition is checked).
In general this keyword can be used to introduce simple delays into sequential spawning patterns or to pause spawning until a particular condition is met.
An example is provided in the xmlextras file that shows how it can be used to spawn gumps and wait for responses.
An important characteristic of WAITUNTIL is that the spawngroup will be spawned with the triggering information of the keyword.  This allows for a series of spawns to be triggered once, with the triggering player information carried forward throughout all of them without any further retriggering.  The xmlextras example provided is a good example of the application, where a player activates a series of gumps which are delivered only to that player, and the spawner is only triggered at the beginning of the series.


So at the moments its waiting for 5 minutes.

so try:

WAITUNTIL,0.083/2 maybe?

Hale- 01-27-2008
No dice. Still sticks after the spawning and stays there, even with a timeout set.

ArteGordon- 01-27-2008
when you set up a spawner with proximity triggering, then every spawned entry has to be triggered by player movement.

It looks like you have the spawner initially triggering with player movement, spawning subgroup 1, and then waiting at subgroup 2 for movement to trigger it again.

To get around that you need to put the spawner in freerun mode. That allows you to trigger it once, and then it continues to run without any additional triggering until you turn off freerun mode.
This will also hold the initial triggering player as the trigmob as it freeruns through other spawn entries so things like SETONTRIGMOB will still work in your subgroup 2.

You configure freerun by setting the FreeRun property on the spawner to true or false.

(Subgroup 1)

SETONTHIS/freerun/true
#PLAYER,3 ; freemeninfantry/frozen/true/combatant/TRIGMOB/warmode/true
SETONTRIGMOB/frozen/true
WAITUNTIL,5
GOTO/2

(Subgroup 2)

SETONTHIS/freerun/false
SETONTRIGMOB/LOCATION/(514,235,0)/SENDMSG/You've been arrested and transported to jail!
DESPAWN,Arrested,1
SETONTRIGMOB/frozen/false
SETONTHIS/running/false

from xmlspawner2.txt
QUOTE

- added a free running trigger mode that allows the spawner to execute multiple spawn entries after triggering with those entries behaving as though they had each been triggered by the same condition.  This is enabled by setting the FreeRun property on the spawner using "SETONTHIS/freerun/true".  The spawner will continue to run as though it were triggered until freerun is turned off with the spawn entry "SETONTHIS/freerun/false". An example of this is given in skilltrigger2.xml. Compare this with skilltrigger1.xml that uses a subgroup block to achieve a similar effect.

Hale- 01-27-2008
Great, thanks so much Arte! You rock!