Full Version : Moving Indiana Jones boulder
xmlspawner >>Q&A >>Moving Indiana Jones boulder
<< Prev | Next >>
Xerrox- 08-30-2006
I am trying to make a moving boulder like the one from the Indiana Jones movie
I am a bit clules how to do this.
1st I need it to move, this can done by spawning it and despawning it several times in a row, but how to do this and get it to spawn at a preset place evrytime, so it moves in a straight line i can't figure out, was thinking a bit like the moving bridge but thats random.
2nd I need the boulder to kill a player if the boulder hits a player, but if the player stand still, i can't get it to detect the player since the xml detects players by movment
If i could get help with this i would be really happy
XavierWER- 08-30-2006
make a spawner with instant respawn delay, SETItem to the boulder
and the entry
SET/x/INC,1
The best thing I can figure to make it kill players is either a xmlfire/lightning
attachment that does alot of damage, proximityrange 0. But they'd have to move
for that, so it probably wouldnt work.
The other thing you could do would to add another spawner with the entry
SETONNEARBY,0,,playermobile/KILL, have it instant respawn. Name it something
like "BoulderKillSpawner"
set the first spawner to group spawning, and add the line
SET,BoulderKillSpawner/x/{GETONTHIS,SetItem.x}/y/{GETONTHIS,SetItem.y}
which will constatly move the Kill spawner to the Boulder.
Xerrox- 08-31-2006
Would it be possible to somehow make the boulder move between waypoints, would make it alot easyer so you wouldent have to put in 30 entry's to make the boulder move 30 tiles ?
ArteGordon- 08-31-2006
this is an interesting idea. One limitation of the current sequential spawning is that the minimum spawner clock tick is 1 second, even if you set min/maxdelay to zero. That is because the spawner timer priority is fixed at 1 second.
I just added the ability to adjust that priority so that you can have things like sequential spawn controlled animation running at up to the maximum timer priority which is 10 milliseconds.
The new property is called BasePriority and you can set it to these values (or their int equivalents)
public enum TimerPriority
{
EveryTick,
TenMS,
TwentyFiveMS,
FiftyMS,
TwoFiftyMS,
OneSecond,
FiveSeconds,
OneMinute
}
The updated version of xmlspawner2.cs is in beta_20_316.zip
Here is an example that does some rapid boulder animation. it automatically stops itself when the boulder exceeds a particular x value and adds in a little random y jitter as it moves it along x.

QUOTE
<Spawns> <Points> <Name>BoulderTrap</Name> <UniqueId>ed497247-be40-4f8b-a114-9cae8cb32de5</UniqueId> <Map>Trammel</Map>
<X>2351</X>
<Y>804</Y>
<Width>4</Width>
<Height>4</Height>
<CentreX>2353</CentreX>
<CentreY>806</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>6</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>static,4952: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/1: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,X&gt;2363/22: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,1,{RND,0,1},0:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/running/false:MX=1:SB=22:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>

ArteGordon- 08-31-2006
to do the collision detection, you could just check to see if the coordinate of the triggering player matched that of the boulder on each tick.
The spawner will trigger on nearby players even if they dont move, but it only does this passive detection on spawner ticks (determined by the min/maxdelay settings).
If you have the spawner ticking once every 250 milliseconds, then you will be able to trigger on players that quickly.
Xerrox- 08-31-2006
Arhh it looks great, thank you so much.
Time to play around with it
ArteGordon- 08-31-2006
here is a full trap with animation that sends a boulder along a line, and collision detection that kills the player if it hits

QUOTE
<Spawns> <Points> <Name>BoulderTrap</Name> <UniqueId>ed497247-be40-4f8b-a114-9cae8cb32de5</UniqueId> <Map>Trammel</Map>
<X>2351</X>
<Y>804</Y>
<Width>4</Width>
<Height>4</Height>
<CentreX>2353</CentreX>
<CentreY>806</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>8</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>8</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>static,4952: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/1: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,X&gt;2363/22: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,1,0,0:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/GETONTRIGMOB,x=GETONSPAWN,1,x &amp; GETONTRIGMOB,y=GETONSPAWN,1,y/33:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/running/false:MX=1:SB=22:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTRIGMOB/KILL:MX=1:SB=33:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>

It will still work without the basepriority mod, but you will see that the animation is really slow.
I also added this XML to the beta_20_316.zip
ArteGordon- 08-31-2006
added a friendly little message when they are killed

QUOTE
<Spawns> <Points> <Name>BoulderTrap</Name> <UniqueId>ed497247-be40-4f8b-a114-9cae8cb32de5</UniqueId> <Map>Trammel</Map>
<X>2351</X>
<Y>804</Y>
<Width>4</Width>
<Height>4</Height>
<CentreX>2353</CentreX>
<CentreY>806</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>8</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>8</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>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>static,4952: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/0: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,X&gt;2363/22: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,1,0,0:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/GETONTRIGMOB,x=GETONSPAWN,1,x &amp; GETONTRIGMOB,y=GETONSPAWN,1,y/33:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/running/false:MX=1:SB=22:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTRIGMOB/MSG/You have been crushed!/KILL:MX=1:SB=33:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>

ArteGordon- 08-31-2006
and here is a continuously running one (it doesnt shut itself off after a single use) that can be triggered once every 30 seconds (configured with refractmin/max).

QUOTE
<Spawns> <Points> <Name>BoulderTrap</Name> <UniqueId>ed497247-be40-4f8b-a114-9cae8cb32de5</UniqueId> <Map>Trammel</Map>
<X>2351</X>
<Y>804</Y>
<Width>4</Width>
<Height>4</Height>
<CentreX>2353</CentreX>
<CentreY>806</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>8</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>8</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<MinRefractory>0.5</MinRefractory>
<MaxRefractory>0.5</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>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>static,4952: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,X&gt;2363/22: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,1,0,0:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/GETONTRIGMOB,x=GETONSPAWN,1,x &amp; GETONTRIGMOB,y=GETONSPAWN,1,y/33:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/dorespawn/true/freerun/false:MX=1:SB=22:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTRIGMOB/MSG/You have been crushed!/KILL:MX=1:SB=33:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>

Xerrox- 09-17-2006
Havent had the time to play around with it before now (RL called) but i have 1 singel problem.
How do i set this up as a GM ?
I use the add xmlspawner and enters most of the values with the prob command.
So i am quite good most of the way untill i get down to this part
<Objects2>static,4952: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,X&gt;2363/22: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,1,0,0:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/GETONTRIGMOB,x=GETONSPAWN,1,x &amp; GETONTRIGMOB,y=GETONSPAWN,1,y/33:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=2:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTHIS/dorespawn/true/freerun/false:MX=1:SB=22:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONTRIGMOB/MSG/You have been crushed!/KILL:MX=1:SB=33:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
</Points>
</Spawns>
What do i do with this i really have no idear, been trying evrything but with no luck !
ArteGordon- 09-17-2006

QUOTE
static,4952:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:

and

QUOTE
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

are specifications for single entries.
it begins with the entry string. The other things are the individual entry settings.
MX=max counts
SB=subgroup
RT=sequential spawn reset time
TO=sequential spawn reset to
KL=kills needed
RK=restrict kills
CA=clear on advance
DN=min delay
DX=max delay
SP=spawns per tick
PR=pack range.
Xerrox- 09-20-2006
Ok i think i have missed something compleately i reall can't get this to work, so i have taken a screen shot of what i have made so far, all i get is a boulder that will spawn when a player comes near
I hope the screen shot will show what i have done wrong/need to do
ArteGordon- 09-20-2006
you only have one entry in the spawner. There should be 8.
You need to add these
SETONTHIS/basepriority/3/freerun/true
IF/GETONSPAWN,1,X>2363/22
etc.
Xerrox- 09-20-2006
Now it's starting to look good. But !
The stone is moving as it should but there still is some problems. It won't kill the players it hit and it's not giving the player the message
You have been crushed !
I have 1 thing different from what i can see you have done i have marked that with a black circel instead of your
IF/GETONSPAWN,1,>2362/22
I have
IF/GETONSPAWN,1,X&gt:2362/22
I have tried to type it in as you have with no succes
What does the 2362/22 stand for ?
When i trigger the stone i get these errors
I get the error show in the scren shot below saying
basepriority : Property not found.
Also a few sec's after this error is shown I can doubel click the xmlspawn and I get a new error saying
insufficient args to IF
Also seen another message that shows up as text on the screen saying
Xmlspawner:invalid type specification: static,4952:MX=1:SB=1:RT=1:0:TO=0:KL=0RK=0:DN=-1:OX=-1SP=1:PR=-1
Hope you can help me
Allmight- 09-20-2006
You must replace the "X&gt:" to ">".
The X&gt: is the escape code for the character >. When someone post on a forum, the forum usually use the > and < characters for special functionality. So the only way to use these charcters in your post is to use the escape code equivalent.
But XmlSpawner dont know anything about these escape codes, hence the error. So just replace the X&gt: with >, and it should work.