I need help with script...


(papaDOC) #1
game_manager
{
	spawn 
   	{

//docs
// Set scenario information

// wm_mapdescription "docs"

wm_axis_respawntime 15
wm_allied_respawntime 15
wm_number_of_objectives 2
wm_set_round_timelimit 15


//we have 2 objectives, taking the documents and transmitting them:
wm_objective_status 1 0 0
wm_objective_status 2 0 0


wm_set_defending_team 0
wm_setwinner 0

accum 1 set 0
accum 2 set 0
}


trigger objective1
{
wm_objective_status 2 1 0
accum 2 set 1
wm_announce "Allied team has transported the documents!"
trigger game_manager checkgame
}

trigger axis_object_stolen
{
wm_objective_status 1 1 0
}

trigger axis_object_returned
{
wm_objective_status 1 0 0
}


trigger checkgame
{ 
accum 2 abort_if_not_equal 1
wm_setwinner 1
wait 1500
wm_endround
}
}

transmitter_obj
{
spawn
{
}
death
{
trigger game_manager objective1
}
}
//theend
		remapshaderflush
		
		// Game rules
		wm_axis_respawntime	1
		wm_allied_respawntime	1
		wm_number_of_objectives	3
		wm_set_round_timelimit	30

		//Accum values
		accum 1 set 0 //Overall Allied status
		accum 2 set 2 //set 2 = null value

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

		// Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at 

expiration)
		wm_setwinner	1 //Assumes allies defending

		wait 2000

		setautospawn	"Forward Spawn"	1 //Uses name from description field of 

team_WOLF_objective
		setautospawn	"Forward Spawn"	0

   	}

//Objective Flags

	trigger objectivecounter  //Destruction of Allied Doors
           	 {
                        	//Set to objective accum to 1 so we know that the 

objective has been completed
                        	accum 1 inc 1

                        	//Call function called checkgame in game_manager to check 

if the round has been won
                        	trigger game_manager checkgame
           	}

	trigger checkgame // checks to see if win requirements have been met
            	{
                        	accum 1 abort_if_not_equal 2
                        	wm_setwinner 0
		wait 1500
                        	wm_endround
           	}


	trigger forwardflagblue
	{
		// Change the objective state internally, so UI can update, etc.
		// Allied takes control of forward flag

		// Some kind of UI pop-up to alert players
		wm_announce	"Allies capture the forward spawn!"

		wm_objective_status	3 1 1
		wm_objective_status	3 0 2

	}

	trigger forwardflagred
	{
		// Change the objective state internally, so UI can update, etc.
		// Axis takes control of forward flag

		// Some kind of UI pop-up to alert players
		wm_announce	"Axis capture the forward spawn!"


		wm_objective_status	3 1 2
		wm_objective_status	3 0 1

	}
} 

//End of Game_manager section

// FORWARD SPAWN POINT ================================================
forward_spawn
{
	spawn
	{
		wait 200
		setstate forwardflag_wobj invisible
		accum 0 set 0
	}

	trigger axis_capture
	{
		trigger game_manager forwardflagred
		trigger forward_spawn setaxis
	}

	trigger allied_capture
	{
		trigger game_manager forwardflagblue
		trigger forward_spawn setallies
	}

	trigger setaxis
	{
		setstate forwardflag_wobj default
		accum 0 abort_if_equal 0
		accum 0 set 0
		alertentity forwardflag_wobj
	}

	trigger setallies
	{
		setstate forwardflag_wobj default
		accum 0 abort_if_equal 1
		accum 0 set 1
		alertentity forwardflag_wobj
	}
}

//coffe
ark
{
 spawn // this is called when the game starts and the entity is spawned
{
wait 200

constructible_class 3 // this indicated that the oasis_wall entity is a dynamitable-only 

entity... 
}

death // this is called when the entity is destroyed... 
{

wm_announce "Allies have breached the Ark of the Covenant!" // ... when the entity is 

destroyed, you annouce the message to all players in game with this


}
}

error on line 199 pleas help!


(Moonkey) #2

You seem to have dumped this in the middle of the game_manager section.


transmitter_obj 
{ 
spawn 
{ 
} 
death 
{ 
trigger game_manager objective1 
} 
} 

it then goes straight into this without any explanation of what this is (i assume it’s meant to be part of the gamemanager spawn block)


//theend 
      remapshaderflush 
       
      // Game rules 
      wm_axis_respawntime   1 
      wm_allied_respawntime   1 
      wm_number_of_objectives   3 
      wm_set_round_timelimit   30 

      //Accum values 
      accum 1 set 0 //Overall Allied status 
      accum 2 set 2 //set 2 = null value 

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

      // Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at expiration) 
      wm_setwinner   1 //Assumes allies defending 

      wait 2000 

      setautospawn   "Forward Spawn"   1 //Uses name from description field of team_WOLF_objective 
      setautospawn   "Forward Spawn"   0 

      } 

I’ve tried to make sense of your script. I’m pretty sure you had some curly braces missing, but here’s a tidy copy:


game_manager 
{ 
        spawn 
        { 
        
               //docs 
               // Set scenario information 
                
               // wm_mapdescription "docs" 
                
               wm_axis_respawntime 15 
               wm_allied_respawntime 15 
               wm_number_of_objectives 2 
               wm_set_round_timelimit 15 
                
                
               //we have 2 objectives, taking the documents and transmitting them: 
               wm_objective_status 1 0 0 
               wm_objective_status 2 0 0 
                
                
               wm_set_defending_team 0 
               wm_setwinner 0 
                
               accum 1 set 0 
               accum 2 set 0 

               remapshaderflush 
               
               // Game rules 
               wm_axis_respawntime   1 
               wm_allied_respawntime   1 
               wm_number_of_objectives   3 
               wm_set_round_timelimit   30 
        
               //Accum values 
               accum 1 set 0 //Overall Allied status 
               accum 2 set 2 //set 2 = null value 
        
                // Stopwatch mode defending team (0=Axis, 1=Allies) 
                wm_set_defending_team   1 
        
                // Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at expiration) 
                wm_setwinner   1 //Assumes allies defending 
        
                wait 2000 
        
                setautospawn   "Forward Spawn"   1 //Uses name from description field of team_WOLF_objective 
                setautospawn   "Forward Spawn"   0 

        } 
        
        
        trigger objective1 
        { 
                wm_objective_status 2 1 0 
                accum 2 set 1 
                wm_announce "Allied team has transported the documents!" 
                trigger game_manager checkgame 
        } 
        
        trigger axis_object_stolen 
        { 
                wm_objective_status 1 1 0 
        } 

        trigger axis_object_returned 
        { 
                wm_objective_status 1 0 0 
        } 


        trigger checkgame 
        { 
                accum 2 abort_if_not_equal 1 
                wm_setwinner 1 
                wait 1500 
                wm_endround 
        } 


        //Objective Flags 
        trigger objectivecounter  //Destruction of Allied Doors 
        { 
                //Set to objective accum to 1 so we know that the objective has been completed 
                accum 1 inc 1 

                //Call function called checkgame in game_manager to check if the round has been won 
                trigger game_manager checkgame 
        } 

        trigger checkgame // checks to see if win requirements have been met 
        {
                accum 1 abort_if_not_equal 2 
                wm_setwinner 0 
                wait 1500 
                wm_endround 
        } 


        trigger forwardflagblue 
        { 
                // Change the objective state internally, so UI can update, etc. 
                // Allied takes control of forward flag 

                // Some kind of UI pop-up to alert players 
                wm_announce   "Allies capture the forward spawn!" 

                wm_objective_status   3 1 1 
                wm_objective_status   3 0 2 

        } 

        trigger forwardflagred 
        { 
                // Change the objective state internally, so UI can update, etc. 
                // Axis takes control of forward flag 

                // Some kind of UI pop-up to alert players 
                wm_announce   "Axis capture the forward spawn!" 


                wm_objective_status   3 1 2 
                wm_objective_status   3 0 1 

        } 
} 

//End of Game_manager section 


transmitter_obj 
{ 
        spawn 
        { 
        } 
        death 
        { 
                trigger game_manager objective1 
        } 
} 

// FORWARD SPAWN POINT ================================================ 
forward_spawn 
{ 
   spawn 
   { 
      wait 200 
      setstate forwardflag_wobj invisible 
      accum 0 set 0 
   } 

   trigger axis_capture 
   { 
      trigger game_manager forwardflagred 
      trigger forward_spawn setaxis 
   } 

   trigger allied_capture 
   { 
      trigger game_manager forwardflagblue 
      trigger forward_spawn setallies 
   } 

   trigger setaxis 
   { 
      setstate forwardflag_wobj default 
      accum 0 abort_if_equal 0 
      accum 0 set 0 
      alertentity forwardflag_wobj 
   } 

   trigger setallies 
   { 
      setstate forwardflag_wobj default 
      accum 0 abort_if_equal 1 
      accum 0 set 1 
      alertentity forwardflag_wobj 
   } 
} 

//coffe 
ark 
{ 
        spawn // this is called when the game starts and the entity is spawned 
        { 
                wait 200 
                constructible_class 3 // this indicated that the oasis_wall entity is a dynamitable-only entity... 
        } 

        death // this is called when the entity is destroyed... 
        { 
                wm_announce "Allies have breached the Ark of the Covenant!"
        } 
}

It’s pretty important to keep your spacing tidy in your script (when you open curly braces, go another tab in, then back one tab when you close them) If you don’t it makes it hard to tell what’s going on.