script_multiplayer causing ET to crash.


(Apple) #1

So I’ve blocked out a map and am trying to put together a simple script which would allow it to be winnable.


game_manager
{
	spawn
	{
		wm_axis_respawntime 20
		wm_allied_respawntime 20
		wm_set_round_timelimit 10
		wm_set_defending_team 0
	   wm_set_winner 0
		accum 1 set 0
	}

	trigger objective_counter
	{
		accum 1 inc 1
		trigger game_manager checkgame
	}

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

axis_gold
{
	spawn
	{
		wait 200
		setstate axis_gold_captured invisible
	}

	trigger stolen
	{
		wm_announce 1 "Return the Axis' gold to the getaway truck"
		wm_announce 0 "The Allies have stolen the Axis' gold"
	}

	trigger returned
	{
		wm_announce 1 "The Axis have retrieved the gold"
		wm_announce 0 "Gold returned! Protect the gold"
	}

	trigger captured
	{
		wm_announce "The Allies have secured the Axis' gold"
		setstate axis_gold_red invisible
		setstate axis_gold_captured default
	}
}

truckbed_trigger
{
	death
	{
		trigger game_manager objective_counter
	}
} 

As you can see, it’s a simple ‘cap the objective’ type of map… Unfortunatley it’s become not so simple. I find (not surprisingly) that when I leave out the scipt_multiplayer entity, the map is no longer winnable. You can bring the axis_gold to the truckbed_trigger and it’ll say/show that it’s been capped, but then nothing happens. The game doesn’t end. But when I do add a script_multiplayer, and have it’s scriptname value set to game_manager, ET simply crashes whenever it tries to load the map.

What am I missing here? 8/


(nUllSkillZ) #2

On Ifurita’s page ( http://planetwolfenstein.com/4newbies/mapping.htm ) you will find a tutorial:
http://planetwolfenstein.com/4newbies/objective.htm


(Apple) #3

…which is of no use to me, unfortunatley. I don’t have a problem creating the scripting and entities needed for an objective based map, I’m having problems with the script_multiplayer entity crashing my map. Since it points to my game_manager I can only assume that something in there is wrong, but I can’t see what:


game_manager
{
   spawn
   {
      wm_axis_respawntime 20
      wm_allied_respawntime 20
      wm_set_round_timelimit 10
      wm_set_defending_team 0
      wm_set_winner 0
      accum 1 set 0
   }

   trigger objective_counter
   {
      accum 1 inc 1
      trigger game_manager checkgame
   }

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

For every open bracket there’s a closed bracket, all the commands are spelled correctly. The source of the problem seems to be the wm_set_winner command. If I remove it then the map will load fine. Is there something else which needs to be included for a wm_set_winner command?


(Loffy) #4

I think it is wm_setwinner 0 (not wm_set_winner 0) and I am not sure you absolutely need wm_set_defending_team 0. (I would delete wm_set_defending_team 0).
:slight_smile:
// Loffy