Full Version : Sequential spawning and WAITUNTIL
xmlspawner >>Q&A >>Sequential spawning and WAITUNTIL


<< Prev | Next >>

DazedAndConfused- 07-08-2006
I want to implement a group of commands separated by a delay. I have set group to true and sequential spawning to 1. Simply the commands may look like this

1. GUMP," ",1/ ...
1. TAKE/.....
1. GOTO/2

2. WAITUNTIL/.1
2. GOTO/3

3. orc

I had thought that WAITUNTIL (in minutes) would delay the processing of spawn entry 3 for 6 seconds, but I am obviously incorrect. All the command happen, but no delay. Anyone know what I may be doing wrong?

ArteGordon- 07-13-2006
the syntax for WAITUNTIL is

WAITUNTIL[,duration][,timeout][/condition][/spawngroup]

so to wait for 0.1 minutes use this

WAITUNTIL,0.1


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.

DazedAndConfused- 07-13-2006
Yes, I tried it with the proper syntax and I tried it as a standalone subgroup, and it still will not generate a pause for me. Is there a special installation step I overlooked? I may also be doing something else incorrectly because I cannot configure a spawner to progress through sequential subgroups without using GOTO. Is there a special sequential spawn setting I am missing?

ArteGordon- 07-14-2006
QUOTE (DazedAndConfused @ July 13, 2006 04:00 pm)
Yes, I tried it with the proper syntax and I tried it as a standalone subgroup, and it still will not generate a pause for me.  Is there a special installation step I overlooked?  I may also be doing something else incorrectly because I cannot configure a spawner to progress through sequential subgroups without using GOTO.  Is there a special sequential spawn setting I am missing?

To enable sequential spawning, you just need to set the SequentialSpawn property

from xmlspawner2.txt
QUOTE

- Added sequential spawning enabled by setting the SequentialSpawn property to a value 0 or greater.  This works in conjunction with subgrouping by setting the spawn order based on the subgroup number.  Normal spawning selects randomly from the entire list of available spawns when determining what to spawn next.  With sequential spawning enabled, on each spawner OnTick (the interval set by min/maxdelay) the next spawn is the subgroup that follows the currently spawned subgroup (SequentialSpawn property contains the currently spawned subgroup)


you just need to take out the GOTO here

2. WAITUNTIL,.1
2. GOTO/3

WAITUNTIL will delay normal sequence advancement, but it doesnt block execution of other spawns in the same subgroup. When it spawns subgroup 2, all entries in the same subgroup are executed and so the GOTO in the same subgroup will force advancement to 3 regardless of the WAITUNTIL

Note that the sequence will advance on every spawner tick, and the time between ticks is determined by the min/maxdelay setting of the spawner.
My guess is that you just have a long min/maxdelay, and so you think that it isnt sequentially spawning even though it is, just very slowly.

DazedAndConfused- 07-14-2006
Finally got it to work. Thanks Arte. I was using Group=True, which inhibited the sequential spawning. Then I had Refract Min/Max set, which seemed to apply after the first entry was executed (or to each entry no doubt). Then I had to deselect Clear on the first mob spawn because it was vanishing as soon as it spawned.

ArteGordon- 07-14-2006
QUOTE (DazedAndConfused @ July 14, 2006 02:00 pm)
Finally got it to work. Thanks Arte. I was using Group=True, which inhibited the sequential spawning. Then I had Refract Min/Max set, which seemed to apply after the first entry was executed (or to each entry no doubt). Then I had to deselect Clear on the first mob spawn because it was vanishing as soon as it spawned.

yep. You generally dont want to combine Group=true with sequential spawning since with Group=true, the spawner will not advance until all spawned objects are cleared and sometimes that can be confusing.

The refractmin/max is the minimum interval that has to pass after the spawner is triggered before it can be triggered again.