Dynamitable objective can still be shot


(TNR360) #21

I kind of figured out how the game should check who the winner is at the end of the round-

axis flags - 0 1 2 3 4
allied flags- 4 3 2 1 0

so if accum is 4 allies have all the flags
if its 3 allies have 3 and axis have 1

can the game end on a tie? so if its 2 - 2 will it end? or does it wait for another flag to be captured?

how can I get this implemented into script but only checked at the end of the game?


(-SSF-Sage) #22

[QUOTE=TNR360;177971]I kind of figured out how the game should check who the winner is at the end of the round-

axis flags - 0 1 2 3 4
allied flags- 4 3 2 1 0

so if accum is 4 allies have all the flags
if its 3 allies have 3 and axis have 1

can the game end on a tie? so if its 2 - 2 will it end? or does it wait for another flag to be captured?

how can I get this implemented into script but only checked at the end of the game?[/QUOTE]

The game can only end on tie, if you have set wm_setwinner -1 and you trigger wm_endround. It won’t end when the round expires, if it’s -1, but will end with wm_endround. That’s why there’s the trigger timelimit_hit. Note that it executes only when the wm_setwinner is set 0/1.

You can inc 1 an accum when allied caps and inc -1 if axis cap. Then when the time expires, check if the accum is bigger, equal or smaller than 0 in the trigger timelimit_hit.


(TNR360) #23

what I hope this script will do is every time the axis get a flag it will count 1 and they need at least 3 out of 4 flags to win, when they have 3 it will set them as winner but it wont end the map

I think (hope) thats what I did in the script… but how do I get the accum to subtract 1 flag if allies retake one of them?


game_manager
{       
      spawn {     
            // Game rules
            wm_axis_respawntime      15
            wm_allied_respawntime    15
            wm_number_of_objectives  4
            wm_set_round_timelimit   24

            // Objectives
            // 1: Take all 4 sections of the city

            // Stopwatch mode defending team (0=Axis, 1=Allies)
            wm_set_defending_team   1

            // Winner on expiration of round timer (0=Axis, 1=Allies, -1=Neither)
            wm_setwinner   1

            wait 500
            setautospawn   "German Spawn"   0
            setautospawn   "Allied Spawn"   1

		// *----------------------------------- vo ------------------------------------------*

		wm_addteamvoiceannounce 0 "ramelle_axcapcity"
		wm_addteamvoiceannounce 0 "ramelle_axstart"

		wm_addteamvoiceannounce 1 "ramelle_alcapcity"
		wm_addteamvoiceannounce 1 "ramelle_alstart"

		wm_teamvoiceannounce 0 "ramelle_axcapcity"
		wm_teamvoiceannounce 0 "ramelle_axstart"

		wm_teamvoiceannounce 1 "ramelle_alcapcity"
		wm_teamvoiceannounce 1 "ramelle_alstart"

		// *---------------------------------------------------------------------------------*
      }
}

// check game

trigger objective_counter
	{
		accum 1 inc 1
		trigger game_manager checkgame
	}

	trigger checkgame
	{
		accum 1 abort_if_not_equal 3
		wm_announce "The Axis Control the city!"
		wm_setwinner 0
		wait 2500
	}

// Flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


//**FLAG 1**\\

Flag1
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture 
{
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 1"   0
	    trigger game_manager objective_counter

            wm_announce   "The Axis have control over the northeast part of town!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}

      trigger allied_capture 
{
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 1"   1

            wm_announce   "The Allies have control over the northeast part of town!"
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}   
}


//**FLAG 2**\\

Flag2
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 2"   0
	    trigger game_manager objective_counter

            wm_announce   "The Axis have control over the southwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 2"   1

            wm_announce   "The Allies have control over the southwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }   
}

//**FLAG 3**\\

Flag3
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter

            wm_announce   "The Axis have control over the southeast!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

            wm_announce   "The Allies have control over the southeast!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }   
}

//**FLAG 4**\\

Flag4
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter

            wm_announce   "The Axis have control over the northwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

            wm_announce   "The Allies have control over the northwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }   
}

//Timelimit hit, checks flag status\\

//trigger timelimit_hit
//	{
//
//	}


(-SSF-Sage) #24

I assume you want allies to win if they got 3/4 too. If not, you can easily change it. This could be made better imo, but this leaves more possibilities I think. So try this.

Ps. You should learn to put your things better on the script. It looks like a bit mess and it’s harder to read. How I do: scriptblock brackets + scriptname = 0 tabs; trigger brackets + trigger names = 1 tab; all commands = 2 tabs. That’s what I found the easiest to read.


game_manager
{       
      spawn {     
            // Game rules
            wm_axis_respawntime      15
            wm_allied_respawntime    15
            wm_number_of_objectives  4
            wm_set_round_timelimit   24

            // Objectives
            // 1: Take all 4 sections of the city

            // Stopwatch mode defending team (0=Axis, 1=Allies)
            wm_set_defending_team   1

            // Winner on expiration of round timer (0=Axis, 1=Allies, -1=Neither)
            wm_setwinner   1

            wait 500
            setautospawn   "German Spawn"   0
            setautospawn   "Allied Spawn"   1

		// *----------------------------------- vo ------------------------------------------*

		wm_addteamvoiceannounce 0 "ramelle_axcapcity"
		wm_addteamvoiceannounce 0 "ramelle_axstart"

		wm_addteamvoiceannounce 1 "ramelle_alcapcity"
		wm_addteamvoiceannounce 1 "ramelle_alstart"

		wm_teamvoiceannounce 0 "ramelle_axcapcity"
		wm_teamvoiceannounce 0 "ramelle_axstart"

		wm_teamvoiceannounce 1 "ramelle_alcapcity"
		wm_teamvoiceannounce 1 "ramelle_alstart"

		// *---------------------------------------------------------------------------------*

		accum 1 set 0 //no flags for axis
		accum 2 set 0 //no flags for allies
      }

	trigger objective_counter_axis
	{
		accum 1 inc 1  //give axis one point
		accum 2 inc -1 //take 1 point from allied
	}

	trigger objective_counter_allied
	{
		accum 2 inc 1
		accum 1 inc -1
	}

	trigger timelimit_hit
	{
		trigger game_manager tie
		trigger game_manager axis_win
		trigger game_manager allies_win
	}

	trigger tie
	{
		accum 1 abort_if_not_equal 2
		wait 1000
		wm_setwinner -1
		wm_endround
	}

	trigger axis_win
	{
		accum 1 abort_if_less_than 2
		wait 1000
		wm_setwinner 0
		wm_endround
	}

	trigger allies_win
	{
		accum 2 abort_if_less_than 2
		wait 1000
		wm_setwinner 1
		wm_endround
	}
}

// Flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


//**FLAG 1**\\

Flag1
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture 
{
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 1"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northeast part of town!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}

      trigger allied_capture 
{
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 1"   1

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northeast part of town!"
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}   
}


//**FLAG 2**\\

Flag2
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 2"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 2"   1
		trigger game_manager objective_counter_allied
            wm_announce   "The Allies have control over the southwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }   
}

//**FLAG 3**\\

Flag3
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southeast!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

            wm_announce   "The Allies have control over the southeast!"
 
		trigger game_manager objective_counter_allied

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }   
}

//**FLAG 4**\\

Flag4
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }   
}


(TNR360) #25

that was exactly what I was thinking of 3/4 for allies and 3/4 for axis if either want to win

I was just not sure how to get the value to subtract if a flag was lost

thanks for the help

btw- well aware of the mess xD


(TNR360) #26

[QUOTE={SSF}Sage;177976]I assume you want allies to win if they got 3/4 too. If not, you can easily change it. This could be made better imo, but this leaves more possibilities I think. So try this.

Ps. You should learn to put your things better on the script. It looks like a bit mess and it’s harder to read. How I do: scriptblock brackets + scriptname = 0 tabs; trigger brackets + trigger names = 1 tab; all commands = 2 tabs. That’s what I found the easiest to read.


game_manager
{       
      spawn {     
            // Game rules
            wm_axis_respawntime      15
            wm_allied_respawntime    15
            wm_number_of_objectives  4
            wm_set_round_timelimit   24

            // Objectives
            // 1: Take all 4 sections of the city

            // Stopwatch mode defending team (0=Axis, 1=Allies)
            wm_set_defending_team   1

            // Winner on expiration of round timer (0=Axis, 1=Allies, -1=Neither)
            wm_setwinner   1

            wait 500
            setautospawn   "German Spawn"   0
            setautospawn   "Allied Spawn"   1

		// *----------------------------------- vo ------------------------------------------*

		wm_addteamvoiceannounce 0 "ramelle_axcapcity"
		wm_addteamvoiceannounce 0 "ramelle_axstart"

		wm_addteamvoiceannounce 1 "ramelle_alcapcity"
		wm_addteamvoiceannounce 1 "ramelle_alstart"

		wm_teamvoiceannounce 0 "ramelle_axcapcity"
		wm_teamvoiceannounce 0 "ramelle_axstart"

		wm_teamvoiceannounce 1 "ramelle_alcapcity"
		wm_teamvoiceannounce 1 "ramelle_alstart"

		// *---------------------------------------------------------------------------------*

		accum 1 set 0 //no flags for axis
		accum 2 set 0 //no flags for allies
      }

	trigger objective_counter_axis
	{
		accum 1 inc 1  //give axis one point
		accum 2 inc -1 //take 1 point from allied
	}

	trigger objective_counter_allied
	{
		accum 2 inc 1
		accum 1 inc -1
	}

	trigger timelimit_hit
	{
		trigger game_manager tie
		trigger game_manager axis_win
		trigger game_manager allies_win
	}

	trigger tie
	{
		accum 1 abort_if_not_equal 2
		wait 1000
		wm_setwinner -1
		wm_endround
	}

	trigger axis_win
	{
		accum 1 abort_if_less_than 2
		wait 1000
		wm_setwinner 0
		wm_endround
	}

	trigger allies_win
	{
		accum 2 abort_if_less_than 2
		wait 1000
		wm_setwinner 1
		wm_endround
	}
}

// Flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


//**FLAG 1**\\

Flag1
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture 
{
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 1"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northeast part of town!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}

      trigger allied_capture 
{
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 1"   1

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northeast part of town!"
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}   
}


//**FLAG 2**\\

Flag2
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 2"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 2"   1
		trigger game_manager objective_counter_allied
            wm_announce   "The Allies have control over the southwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }   
}

//**FLAG 3**\\

Flag3
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southeast!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

            wm_announce   "The Allies have control over the southeast!"
 
		trigger game_manager objective_counter_allied

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }   
}

//**FLAG 4**\\

Flag4
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }   
}

[/QUOTE]

No matter what I do allies always win :S

and if I set winner -1 the map hangs on 0:00 and does nothing


(-SSF-Sage) #27

[QUOTE=TNR360;177994]No matter what I do allies always win :S

and if I set winner -1 the map hangs on 0:00 and does nothing[/QUOTE]

OK. Keep the wm_setwinner 1 in spawn. But change this:


	trigger timelimit_hit
	{
                wm_setwinner -1          //this should reset the winner in the first place.
		trigger game_manager tie
		trigger game_manager axis_win
		trigger game_manager allies_win
	}

(TNR360) #28

[QUOTE={SSF}Sage;177996]OK. Keep the wm_setwinner 1 in spawn. But change this:


	trigger timelimit_hit
	{
                wm_setwinner -1          //this should reset the winner in the first place.
		trigger game_manager tie
		trigger game_manager axis_win
		trigger game_manager allies_win
	}

[/QUOTE]

always ends in a tie now no matter what I do

:S this is getting complicated it seems


(-SSF-Sage) #29

[QUOTE=TNR360;178036]always ends in a tie now no matter what I do

:S this is getting complicated it seems[/QUOTE]

I made a little mistake… This should had just make it be tie, when there’s no full hold… Now tell me what happens with g_scriptdebug 1. Does it check the trigger allies_win, axis_win and tie? If you still can’t solve it, you can send it to me so I can try too. I didn’t test the scripts I wrote, but they should work.

	trigger axis_win
	{
		accum 1 abort_if_less_than 3 //was 2
		wait 1000
		wm_setwinner 0
		wm_endround
	}

	trigger allies_win
	{
		accum 2 abort_if_less_than 3   //was 2
		wait 1000
		wm_setwinner 1
		wm_endround
	}

(TNR360) #30

thanks for all the help…

I’ll give this a try when I get my pc back, the power supply burnt up xD


(TNR360) #31


theres the console using script debug

at the end it sets axis as winner but still ends in a tie???

the pics are in order

I touched 4 flags as axis

game_manager
{       
      spawn {     
            // Game rules
            wm_axis_respawntime      15
            wm_allied_respawntime    15
            wm_number_of_objectives  4
            wm_set_round_timelimit   24

            // Objectives
            // 1: Take all 4 sections of the city

            // Stopwatch mode defending team (0=Axis, 1=Allies)
            wm_set_defending_team   1

            // Winner on expiration of round timer (0=Axis, 1=Allies, -1=Neither)
            wm_setwinner   1

            wait 500
            setautospawn   "German Spawn"   0
            setautospawn   "Allied Spawn"   1

		// *----------------------------------- vo ------------------------------------------*

		wm_addteamvoiceannounce 0 "ramelle_axcapcity"

		wm_addteamvoiceannounce 1 "ramelle_alcapcity"

		wm_teamvoiceannounce 0 "ramelle_axcapcity"

		wm_teamvoiceannounce 1 "ramelle_alcapcity"

		// *---------------------------------------------------------------------------------*

		accum 1 set 0 //no flags for axis
		accum 2 set 0 //no flags for allies
      }

	trigger objective_counter_axis
	{
		accum 1 inc 1  //give axis one point
		accum 2 inc -1 //take 1 point from allied
	}

	trigger objective_counter_allied
	{
		accum 2 inc 1
		accum 1 inc -1
	}

	trigger timelimit_hit
	{
                wm_setwinner -1          //this should reset the winner in the first place.
		trigger game_manager tie
		trigger game_manager axis_win
		trigger game_manager allies_win
	}

	trigger tie
	{
		accum 1 abort_if_not_equal 2
		wait 1000
		wm_setwinner -1
		wm_endround
	}

	trigger axis_win
	{
		accum 1 abort_if_less_than 3 //was 2
		wait 1000
		wm_setwinner 0
		wm_endround
	}

	trigger allies_win
	{
		accum 2 abort_if_less_than 3   //was 2
		wait 1000
		wm_setwinner 1
		wm_endround
	}
}

// Flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


//**FLAG 1**\\

Flag1
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture 
{
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 1"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northeast part of town!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}

      trigger allied_capture 
{
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 1"   1

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northeast part of town!"
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf1"

		// *---------------------------------------------------------------------------------*
               
            alertentity Flag1_obj
}   
}


//**FLAG 2**\\

Flag2
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    setautospawn   "Flag 2"   0
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag
	    setautospawn   "Flag 2"   1
		trigger game_manager objective_counter_allied
            wm_announce   "The Allies have control over the southwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf2"

		// *---------------------------------------------------------------------------------*

            alertentity Flag2_obj
      }   
}

//**FLAG 3**\\

Flag3
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the southeast!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

            wm_announce   "The Allies have control over the southeast!"
 
		trigger game_manager objective_counter_allied

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf3"

		// *---------------------------------------------------------------------------------*

            alertentity Flag3_obj
      }   
}

//**FLAG 4**\\

Flag4
{
      spawn {
            accum 0 set -1   // Who has the flag: 0-Axis, 1-Allied
      }

      trigger axis_capture {
            // Flag has been touched by an Axis player
            accum 0 abort_if_equal 0 // did Axis own flag?

            accum 0 set 0 // Axis own the pole
	    trigger game_manager objective_counter_axis

            wm_announce   "The Axis have control over the northwest!"

		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 1 "ramelle_axf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }

      trigger allied_capture {
            // Flag has been touched by an allied player
            accum 0 abort_if_equal 1 // do Allies own flag?

            accum 0 set 1 // Allied own the flag

		trigger game_manager objective_counter_allied

            wm_announce   "The Allies have control over the northwest!"
 
		// *----------------------------------- vo ------------------------------------------*

		wm_teamvoiceannounce 0 "ramelle_alf4"

		// *---------------------------------------------------------------------------------*

            alertentity Flag4_obj
      }   
}

(-SSF-Sage) #32

Ahh. From that dump, I think I found the error. It’s what I call wait bug (it’s not really a bug). Try to remove those waits from the win triggers.


(TNR360) #33

thanks it works great :smiley: