Full Version : increment x
xmlspawner >>XMLSpawner - Discussion >>increment x


<< Prev | Next >>

Haazen- 12-27-2006
How could I use XMLSpawner and increment x.

For example: spawn something and then loop the value of x. In essence, moving the item in the x direction.

ArteGordon- 12-27-2006
take a look at the boulder.xml example. It does exactly that

QUOTE

- included an example of the use of modified timer priority in boulder.xml which creates an animated boulder moving across the screen triggered by nearby players, and if it detects a collision with the triggering player then it kills them (thanks to Xerrox for the idea).
You can play around with changing the basepriority setting in the spawner entry to see how it changes the animation speed.

Draque- 12-28-2006
This Boulder.xml example works greatly. Even I understand how it works and how to change their parameters, direction of boulder...etc.

But I have one noob question:
For example I will add on spawner some custom structure. I set it to spawn under ground, then I will change z: SETONSPAWN,1/OFFSET,0,0,5
Also I know how to raise it and move it in some direction.

My question: How to stop spawn when this object vill be whole visible? (Z=0) If I write condition IF/GETONSPAWN,1,Z=0/40 and at line 40 SETONTHIS/dorespawn/true/freerun/false this object is still spawned around.

Sorry for dumb question, but I tried different conditions and it doesnt work for me.

ArteGordon- 12-28-2006
is the object reaching Z=0 exactly? You might want to change the test to Z>0 instead.
Is it getting to line 40?

If it is, then you could try forcing the object to despawn by changing this entry

SETONTHIS/dorespawn/true/freerun/false

to these two entries grouped together

DESPAWN,1
SETONTHIS/freerun/false

Draque- 12-28-2006
Thx Arte for quick answer. I tried to do it like you wrote, but iit's still spawned around. Maybe the best way will be place here XML code:

<Spawns>
<Points>
<Name>GhostBoat</Name>
<UniqueId>5c115872-c68d-431e-83e2-270153215dbf</UniqueId>
<Map>Trammel</Map>
<X>2773</X>
<Y>2171</Y>
<Width>0</Width>
<Height>0</Height>
<CentreX>2773</CentreX>
<CentreY>2171</CentreY>
<CentreZ>-3</CentreZ>
<Range>5</Range>
<MaxCount>7</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>-1</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>1</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<AllowNPCTriggering>False</AllowNPCTriggering>
<SpawnOnTrigger>False</SpawnOnTrigger>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>False</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>smallboat/z/-80:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/basepriority/3/freerun/true:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/GETONSPAWN,1,Z&gt;-4/30:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONSPAWN,1/OFFSET,0,0,5:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/2:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=DESPAWN,1:MX=1:SB=30:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/freerun/false:MX=1:SB=30:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>

ArteGordon- 12-28-2006
ok, I checked it out. I forgot that DESPAWN only works on spawns that have the CLR flag set.
Use this instead

SETONSPAWN,1/DELETE


Draque- 12-28-2006
Thank you Arte, this prevents to spawn it around.