ArteGordon
Wanderer
Knightshade said:We're not interested in saving all waypoint data, just the ability to tell the spawn that, upon spawning, it needs to go to "this waypoint."
For this sort of thing, one option to consider is to assign the "Home" location on spawning instead of using waypoints. This will allow you to spawn in one spot, and then have the mobs migrate to the target "Home" location. It accomplishes the same thing as using a waypoint, but without the additional item overhead.
Also, depending on how you set it up, it may be preferable because you can specify different target locations for each spawn as opposed to having to set up a different spawner for different waypoints.
The waypoint has the advantage of being easier to set up and manipulate.
The roving band example that I posted a little while back demonstrates this sort of thing, although you wouldnt need the two spawners or the SETONSPAWN, you could just do it as
orc/home/(5417,1168,0)
Code:
<?xml version="1.0" standalone="yes"?>
<Spawns>
<Points>
<Name>RovingBand#2</Name>
<UniqueId>380f291e-4a72-4d34-ac71-63a09a6dfc38</UniqueId>
<Map>Felucca</Map>
<X>5431</X>
<Y>1146</Y>
<Width>10</Width>
<Height>10</Height>
<CentreX>5436</CentreX>
<CentreY>1151</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>4</MaxCount>
<MinDelay>2</MinDelay>
<MaxDelay>2</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>-1</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<ContainerX>0</ContainerX>
<ContainerY>0</ContainerY>
<ContainerZ>0</ContainerZ>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>2</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>SETONSPAWN,RovingBand#1,1/home/(5447,1147,0)/SAY/let's go!:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=SETONSPAWN,RovingBand#1,1/home/(5436,1131,0)/SAY/Move it!:MX=1:SB=2:RT=0:TO=0:KL=0:OBJ=SETONSPAWN,RovingBand#1,1/home/(5437,1173,0)/SAY/Time to go!:MX=1:SB=3:RT=0:TO=0:KL=0:OBJ=SETONSPAWN,RovingBand#1,1/home/(5417,1168,0)/SAY/I'm bored.:MX=1:SB=4:RT=0:TO=0:KL=0</Objects2>
</Points>
<Points>
<Name>RovingBand#1</Name>
<UniqueId>d7077bfa-4d4e-4981-b6f3-f87f1e72f312</UniqueId>
<Map>Felucca</Map>
<X>5430</X>
<Y>1146</Y>
<Width>10</Width>
<Height>10</Height>
<CentreX>5435</CentreX>
<CentreY>1151</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>7</MaxCount>
<MinDelay>5</MinDelay>
<MaxDelay>10</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>-1</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<ContainerX>0</ContainerX>
<ContainerY>0</ContainerY>
<ContainerZ>0</ContainerZ>
<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>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>orc:MX=4:SB=1:RT=0:TO=0:KL=0:OBJ=orcishmage:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=orcishlord:MX=2:SB=1:RT=0:TO=0:KL=0</Objects2>
</Points>
</Spawns>
(edit)
just tested saving and restoring waypoints on xmlsave/xmloads using the scheme I described earlier and it works fine. I'll add it to the next release.