script with no ending


(=ds=bart) #1

hi i used this part of the et_beach script
to learn from i know it pretty well exept when it comes to the finishing part then i always geth stuck.
i can take it bud when i run to the dropoff zone nothing happens .

game_manager
{
	spawn
	{

		// Game rules
		wm_axis_respawntime	30
		wm_allied_respawntime	30
		wm_number_of_objectives 7
		wm_set_round_timelimit	12

		// Objectives
		// 1: Primary1 : Steal the Documents
		// 2: Primary2 : Transmit the documents
		

		wm_objective_status 1 1 0
		wm_objective_status 1 0 0
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0
		
		wait 50
		setstate forward_wobj invisible
		setstate forwardflag_cm_marker invisible

		
		// Set Defending Team for SW Mode

		wm_set_defending_team	1

		// If the round timer expires, the Allies have won, so set the current winning team
		// Set the round winner:  0 == AXIS, 1 == ALLIED
		wm_setwinner 1

		wait 450

		

trigger objective1
	{
		accum 2 set 1
		wm_announce "^1The Axis team has transmited the Secret War Documents!"

		wm_objective_status 		2 0 1
		wm_objective_status 		2 1 2

		
		trigger game_manager checkgame
	}

	trigger axis_object_stolen
	{
		wm_objective_status 		1 0 1
		wm_objective_status 		1 1 2
	}

	trigger axis_object_returned
	{
		wm_objective_status 		1 0 2
		wm_objective_status 		1 1 1
	}

	
}
radioend
{
	spawn
	{
	}
	death
	{
	trigger game_manager objective1
	}
}
axis_obj01
{
	spawn
	{
	}

	trigger stolen
	{
		wm_objective_status 		1 0 1
		wm_objective_status 		1 1 2
	}

	trigger returned
	{
		wm_objective_status 		1 0 2
		wm_objective_status 		1 1 1
	}

	trigger captured
	{

	}
}
trigger checkgame
	{ 
		accum 2 abort_if_not_equal 1
		wm_setwinner 0

		wait 1500
		wm_endround
	}
}

why wont it end the game when i have stolen the objective and taken it to the dropoff zone .


(kamikazee) #2

First of all, there seems to be an ‘}’ missing, right above trigger objective1

EDIT: Ok, there are quite some strange parts in your code, sure you copy/pasted it correctly? :confused:


(Cheez It) #3

trigger checkgame should be in the game_manager block other than that and the missing } your script looks fine.


(S14Y3R) #4

Hey man: first off set accum 2 to 0 when the map_restarts, like:
after


      wm_number_of_objectives 7 
      wm_set_round_timelimit   12

put


accum 2 set 0

K dude, now when the team_CTF_redflag(the document entity) is delivered to the trigger_flagonly_multiple(the delivery point entity) the script calls:

trigger radioend death, which calls:

trigger objective1 
   { 
      accum 2 set 1 
      wm_announce "^1The Axis team has transmited the Secret War Documents!" 

      wm_objective_status       2 0 1 
      wm_objective_status       2 1 2 

       
      trigger game_manager checkgame 
   }

and then

trigger checkgame 
   { 
      accum 2 abort_if_not_equal 1 
      wm_setwinner 0 

      wait 1500 
      wm_endround 
   } 
}

Try setting up your objective1 like:

objective1
{
{
      wm_objective_status       2 0 1 
      wm_objective_status       2 1 2 

      wm_announce "^1The Axis team has transmited the Secret War Documents!" 
     
      wait 1000

      accum 2 inc 1
      trigger game_manager checkgame 
}
}

This way, the status can change smoothly, and the announcment will display before it ends the round. Your checkgame looks good, so don’t change that.


(=ds=bart) #5

heres the little map file i made for this script.
http://s40.yousendit.com/d.aspx?id=33Q373KUZR84I040PGTSEWI6K1

thx in advance .
i will do all the changens today so i can tets it again
just a little box map for testing stuff lol.