Script Problem


(X3t) #1

Hi Guys,

I’ve started mapping for about a week ago, and in a day i’ve made myself a blowable wall…
Now I wanted to add a ‘documents’-objective, and I came up with the following code:

game_manager
{
   spawn
   {

	wm_mapdescription "Blow the gate, capture the documents and secure them at the house on the beach!"

	wm_axis_respawntime 15
	wm_allied_respawntime 25
	wm_number_of_objectives 3
	wm_set_round_timelimit 15

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


	wm_set_defending_team 0
	wm_setwinner 0

	accum 1 set 0
	accum 2 set 0
	accum 3 set 0	
   }


percy_obj1
{
   spawn
   {
	wait 200
	constructible_class 3
   }

   death
   {
      trigger game_manager objective1
   }
}

trigger objective1
{
	wm_set_objective_status 1 1
	wm_announce "Allies have blown the Main Gate!!"
	accum 1 set 1
}

trigger objective2
{

	wm_set_objective_status 3 1
	accum 3 set 1
	wm_announce "Allied team has transmitted the documents!"
	trigger game_manager checkgame
}

trigger axis_object_stolen
{
	wm_announce "Allied team has stolen the documents!"
	wm_set_objective_status 2 1
}

trigger axis_object_returned
{
	wm_announce "The axis have returned the documents!"
	wm_set_objective_status 2 0
}


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


transmitter_obj
{
	spawn
	{
	}

	death
	{
		trigger game_manager objective2
	}
}



}

I haven’t tested the documents objective, because I cannot blow the wall… If I plant at the wall it says “Dynamite planted”, but it doesn’t blow. (Also the dyno-icon doesn’t show up, although ive set spawnflags to 76 and constructible_class to 3).

Anyone knows what i’ve done wrong? I’m suspicious about my scripting…

Thanks alot!
:drink:


(X3t) #2

Hmm, found myself having deleted the script_multiplayer entity. I remade it, with scriptname = game_manager, and now I get this errors like:
G_Script_ScriptParse() unknown action wm_mapdescription (and wm_set_objective_status etc, etc)

???
Dont know whats wrong, these actions must be valid… Any chance knowing whats wrong? Im thinking i’ve exported the files in wrong way… In GTkradiant i’ve selected 'BSP -> Q3map2: (test) BSP -meta -vis -light -fast -filter

Console:

\g_gametype 2
\sv_pure 0
\devmap mapname

Many thanks :moo:


(Ifurita) #3

Kill the wm_mapdescription line

Here’s a tutorial for grab 'n cap objectives

http://www.planetwolfenstein.com/4newbies/objective.htm