script problem


(???HoneyBear) #1

Hello, I’m trying to complete my first map entitled addiction. So far my script allows the three objectives to be picked up and returned, however I m missing the code that will allow the game to be completed. The scripting part is not my forte’ it still is quite confusing to me. If any of you wouldn’t mind helping me out just a lil bit, I would really appreciate it. I’m really just going for a first playable right now so it doesn’t bother me if it’s just the nessecites for now.

I’m just going to post the script in the next comment, I’m haing issues with this forum right now too.


(???HoneyBear) #2
game_manager
{
	spawn
	{


		}
		trigger objs_captured 
		{
		wm_teamannounce 0 "Axis have both objectives"
		wm_teamannounce 1 "Axis have both Objectives"
 
      wait 3000
      wm_setwinner 0
      wm_endround
}
}
      //objective list
      //1:Steal the Chocolate
      //2:Steal the Pale Ale
      //3:Steal the Jack Flash
      //wm_objective_status 
      wm_objective_status 1 1 0
      wm_objective_status 1 0 0
      wm_objective_status 2 1 0
      wm_objective_status 2 0 0
      wm_objective_status 3 1 0
      wm_objective_status 3 0 0		
//*=========================================================*
//*========================Pale Ale=========================*
//*=========================================================*

pale_ale 
{
	spawn
	{
		
		}
		trigger stolen 
		{
		wm_teamannounce 0 "We've stolen the Pale Ale"
		wm_teamannounce 1 "They took our pale ale"
		
		}
		trigger returned //the allies return it
		{

		wm_teamannounce 0 "They've returned the pale ale"
		wm_teamannounce 1 "We got the pale ale back"
		
		}
		trigger captured {
		wm_teamannounce 0 "We captured the pale ale"
		wm_teamannounce 1 "They secured the pale ale"
		}
		}
//*=========================================================*
//*=======================Jack Flash========================*
//*=========================================================*
jack_flash 
{
	spawn
	{
	
		}
		trigger stolen //activated when someone picks it up
		{
		wm_teamannounce 0 "We've stolen the Jack Flash"
		wm_teamannounce 1 "They took our Jack Flash"
		
		}
		trigger returned //the allies return it
		{

		wm_teamannounce 0 "They've returned the Jack Flash"
		wm_teamannounce 1 "We got the Jack Flash back"
		}
		trigger captured //
		{
		wm_teamannounce 0 "We captured the Jack Flash"
		wm_teamannounce 1 "They secured the Jack Flash"
//*=========================================================*
//*========================Chocolate========================*
//*=========================================================*
choco_late 
{
	spawn
	{

		}
		trigger stolen //activated when someone picks it up
		{
		wm_teamannounce 0 "We've stolen the Chocolate"
		wm_teamannounce 1 "They took our Chocolate"

		}
		trigger returned //the allies return it
		{

		wm_teamannounce 0 "They've returned the Fudge"
		wm_teamannounce 1 "We got the Fudge back"

		}
		trigger captured 
		{
		wm_teamannounce 0 "We captured the Fudge"
		wm_teamannounce 1 "They secured the Fudge"


(S14Y3R) #3

1st, there’s no wm_teamannounce, you’ll need to use wm_announce “quote”

game_manager 
{ 
   spawn 
   { 
     	// Game rules
		wm_axis_respawntime	15
		wm_allied_respawntime	15
		wm_number_of_objectives 3
		wm_set_round_timelimit	30

     accum 1 set 0

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

      } 
      trigger obj1_captured 
      { 
      wm_objective_status 1 1 2  //failed
      wm_objective_status 1 0 1   //succeded

      wm_wm_announce  "Axis have one Objective" 
accum 1 inc 1

  trigger game_manager check_game
}

 trigger obj2_captured 
      { 
      wm_wm_announce  "Axis have second Objective" 
accum 1 inc 1

  trigger game_manager check_game
}

 trigger obj3_captured 
      { 
      wm_wm_announce  "Axis have third Objective" 
accum 1 inc 1

  trigger game_manager check_game
}


trigger check_game
{
accum 1 abort_if_not_equal 3
     
      wm_setwinner 0 
      wm_endround 
} 
} 
      //objective list 
      //1:Steal the Chocolate 
      //2:Steal the Pale Ale 
      //3:Steal the Jack Flash 
      //wm_objective_status 
      wm_objective_status 1 1 0 
      wm_objective_status 1 0 0 
      wm_objective_status 2 1 0 
      wm_objective_status 2 0 0 
      wm_objective_status 3 1 0 
      wm_objective_status 3 0 0       
//*=========================================================* 
//*========================Pale Ale=========================* 
//*=========================================================* 

pale_ale 
{ 
   spawn 
   { 
       
      } 
      trigger stolen 
      { 

      wm_announce  "They took our pale ale" 
       
      } 
      trigger returned //the allies return it 
      { 

      wm_teamannounce 0 "They've returned the pale ale" 
      wm_teamannounce 1 "We got the pale ale back" 
       
      } 
      trigger captured { 
      wm_teamannounce 0 "We captured the pale ale" 
      wm_teamannounce 1 "They secured the pale ale" 
trigger game_manager obj1_captured
      } 
      } 
//*=========================================================* 
//*=======================Jack Flash========================* 
//*=========================================================* 
jack_flash 
{ 
   spawn 
   { 
    
      } 
      trigger stolen //activated when someone picks it up 
      { 
      wm_teamannounce 0 "We've stolen the Jack Flash" 
      wm_teamannounce 1 "They took our Jack Flash" 
       
      } 
      trigger returned //the allies return it 
      { 

      wm_teamannounce 0 "They've returned the Jack Flash" 
      wm_teamannounce 1 "We got the Jack Flash back" 
      } 
      trigger captured // 
      { 
      wm_teamannounce 0 "We captured the Jack Flash" 
      wm_teamannounce 1 "They secured the Jack Flash" 
trigger game_manager obj2_captured
}
}
//*=========================================================* 
//*========================Chocolate========================* 
//*=========================================================* 
choco_late 
{ 
   spawn 
   { 

      } 
      trigger stolen //activated when someone picks it up 
      { 
      wm_teamannounce 0 "We've stolen the Chocolate" 
      wm_teamannounce 1 "They took our Chocolate" 

      } 
      trigger returned //the allies return it 
      { 

      wm_teamannounce 0 "They've returned the Fudge" 
      wm_teamannounce 1 "We got the Fudge back" 

      } 
      trigger captured 
      { 
      wm_teamannounce 0 "We captured the Fudge" 
      wm_teamannounce 1 "They secured the Fudge" 
trigger game_manager obj3_captured
}
}

Make sure you close your routines properly, }}}}}}}}}}}}} :stuck_out_tongue:
set up this way, the manager keeps track of how many obj’s have been stolen. and does not allow the game to end until all three have been captured. I’ll let you fix the rest of your wm_announce’s. Hope this helps, only took a minute or five.


(S14Y3R) #4

*add: D’oh, If you still want team specific announcements, you can use an audio file. wm_teamvoiceannounce 0 “your_mapname_vo”, here’s an example of how_to: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=13965&highlight=


(???HoneyBear) #5

Thnks for help, I been gone for awhile so I havny had time to work on it. Thank you so much by the way.