Hi guys,
there is a spawnbug in my map that I can even reproduce, but i have no clue why it is there at all.
And working around it produces another bug. Anyways I ll just tell you what we got here:
// ----- AXIS FIRST SPAWN
spawnstartax_spawns
{
spawn
{
}
trigger off
{
setstate spawnstartax_spawns invisible
}
}
spawnstartax_wobj // first Axis spawn - descr. "Axis Start"
{
spawn
{
wait 50
setstate spawnstartax_wobj default
}
trigger on
{
setstate spawnstartax_wobj default
}
trigger off
{
setstate spawnstartax_wobj invisible
}
}
// ----- FLAG in GUARD HOUSE
spawngh_flag
{
spawn
{
wait 150
accum 2 set 1 // Allies have the flag at the start
setautospawn "Axis Start" 0
setautospawn "Guardhouse" 1
}
trigger allied_capture
{
accum 2 abort_if_equal 1 // allies own the flag already
accum 2 set 1
wm_objective_status 5 0 2
wm_objective_status 5 1 1
wm_announce "^1Allies have captured the Guardhouse Flag!"
alertentity spawngh_wobj
setautospawn "Guardhouse" 1
setautospawn "Axis Start" 0
trigger spawnstartax_wobj on
}
trigger axis_capture
{
accum 2 abort_if_equal 0 // axis already own the flag
accum 2 set 0
wm_objective_status 5 0 1
wm_objective_status 5 1 2
wm_announce "^1Axis have captured the Guardhouse Flag!"
alertentity spawngh_wobj
trigger spawnstartax_wobj off
setautospawn "Monastery" 1
setautospawn "Guardhouse" 0
}
}
I can get a bug this way:
- spawn as allies (capture the flag that you spawn next to, it makes no difference whether the allied flag is raised or not)
- manually select Monastery spawn, selfkill, spawn in Monastery
- spawn as axis
- go to flag, capture flag (which sets Guardhouse as autospawn for Axis), selfkill
- axis player spawns at Axis Start (whose wobj even got set invisible)
:eek:
I mean, how on earth can the spawnselection of an allied player mess up the axis autospawns?
The only idea i have for this is that the allied Monastery spawn has the spawnnumber as the Axis Start spawn, and that that number gets stored somewhere and overrides the set autospawn.
Workaround #1:
// ----- AXIS FIRST SPAWN
spawnstartax_spawns
{
spawn
{
}
trigger off
{
setstate spawnstartax_spawns invisible
}
}
spawnstartax_wobj // first Axis spawn - descr. "Axis Start"
{
spawn
{
wait 50
setstate spawnstartax_wobj default
}
trigger on
{
setstate spawnstartax_wobj default
}
trigger off
{
setstate spawnstartax_wobj invisible
}
}
// ----- FLAG in GUARD HOUSE
spawngh_flag
{
spawn
{
wait 150
accum 2 set 1 // Allies have the flag at the start
setautospawn "Axis Start" 0
setautospawn "Guardhouse" 1
}
trigger allied_capture
{
accum 2 abort_if_equal 1 // allies own the flag already
accum 2 set 1
wm_objective_status 5 0 2
wm_objective_status 5 1 1
wm_announce "^1Allies have captured the Guardhouse Flag!"
alertentity spawngh_wobj
trigger spawnstartax_wobj on
setstate spawnstartax_spawns default
setautospawn "Axis Start" 0
setautospawn "Guardhouse" 1
}
trigger axis_capture
{
accum 2 abort_if_equal 0 // axis already own the flag
accum 2 set 0
wm_objective_status 5 0 1
wm_objective_status 5 1 2
wm_announce "^1Axis have captured the Guardhouse Flag!"
alertentity spawngh_wobj
trigger spawnstartax_wobj off
setstate spawnstartax_spawns invisible
setautospawn "Monastery" 1
setautospawn "Guardhouse" 0
}
}
Difference: now I set the axis spawnboxes invisible when axis captures the flag. Only now I can get a bug this way:
- spawn as allies
- manually select Monastery spawn, selfkill, spawn in Monastery
- spawn as axis
- go to flag, capture flag, selfkill
- axis player spawns at Guardhouse (correct spawn… this is better now)
- spawn as allies (back on Monastery, of course)
- run to flag, recapture it (which sets autospawn guardhouse), selfkill
- allied player STILL spawns at Monastery
:eek2:
Actually I think this situation can only happen in elaborate testing. Its very unlikely that on a server all the players will choose the back spawn and then recapture the flag. They will have lost the first stage before they get back to the flag.
Still, I d like to understand what s going on here… suggestions anyone?
(I can but hope spawns and flags will be better programmed in QW…)