Hello,
I have 2 questions about the following things. It would be great if you guys could give me some hints.
- In my map both teams can score points. The problem is the end sequence.
I want the map to end like this:
Axis have most points -> Axis win
Allies have most ponts -> Allies win
Both teams same points -> Draw
I would also like to have a little delay after the map has ended so the players can still move, but can’t change the winner anymore.
This is the relevant part of my game_manager:
game_manager
{
spawn
{
remapshaderflush
wm_axis_respawntime 12
wm_allied_respawntime 12
wm_set_round_timelimit 30
wm_setwinner 0
wait 500
accum 0 set 2147483647
}
trigger timelimit_hit
{
printaccum 0
wm_setwinner -1
trigger self check_allies
trigger self check axis
accum 0 abort_if_not_equal 2147483647
wm_announce "^3Both teams are doomed!"
wm_endround
}
trigger check_axis
{
accum 0 abort_if_equal 2147483647
accum 0 abort_if_less_than 2147483647
wm_setwinner 0
wm_announce "^3Allies are doomed!"
wm_endround
playsound Panzerball_axis_win volume 512
}
trigger check_allies
{
accum 0 abort_if_equal 2147483647
accum 0 abort_if_greater_than 2147483647
wm_setwinner 1
wm_announce "^3Allies escape!"
wm_endround
playsound Panzerball_allies_win volume 512
}
}
If both teams have the same number of points its draw. But if any of the teams has more points allies always win (even if accum 0 is something like 2147483648). It seems like the script completley ignores the abort_if_greater_than.
I use accum 0 to keep track of the score. I’ve chosen 2147483647 as value for it, because as far as i know accums can store 32 bit integer values so from 0 to (2^32)-1 so i set it to (2^31)-1 which should be pretty close to the middle.
To make sure that the score part works correct i’ve added the print accum ( and this works correct).
Next problem is the delay. Couldnt really think of any good way to implement that, because if the winner is set to -1 it wont call the timelimit_hit trigger and i dont really want to use a wait, because the value for 30 mins would be 30601000
dont really know if it would be a good idea to let that counter run the whole time during the map and nobody could manually change the timelimit.
- The second problem is probably quite easy to solve, but i think im kinda blind or something.
I just want a script_mover to call its death trigger when its shot by a panzer and then come back with full health.
So my script_mover has the following setup:
“classname” “script_mover”
“spawnflags” “46”
“scriptname” “allies_goal”
“targetname” “allies_goal”
“health” “1”
46 = solid; allied; explosivedamageonly; resurectable
script part:
allies_goal
{
spawn
{
wait 500
accum 0 bitset 1
accum 0 bitset 2
}
death
{
trigger self score_axis
alertentity allies_goal
}
}
It calls the death trigger and it also calles the rebirth, but it seems like it cant be damaged again.
I really tried to figure out these problems myself so sorry if im asking redundant questions and thanks in advance for the help.
Greetz Max1
But he’s probably trying to trigger the score_axis from game_manager. That’s the only clever thing imo (trigger it in game_manager). So change it if it’s not inside the scriptblock.