Cannot make map finish on event.


(==Troy==) #1

I know that this is quite a nooby question, but I have already tried to solve this myself, no luck…

game_manager
{

spawn

{
  	 
wm_axis_respawntime 15

wm_allied_respawntime 15

wm_set_round_timelimit 20

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

wm_set_defending_team 0

// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)

wm_setwinner 0

wait 500

setautospawn "Axis Spawn" 0

setautospawn "Allied Spawn" 1
} 

trigger allies_win  	 
{ 	 
	wm_announce "The Allies blew up the Radar parts!"

	wm_setwinner 1

	wait 3000

	wm_endround
}

}

Radar_parts
{
spawn
{
wait 350
constructible_class 2 // 2=satchel 3=dyna
wm_announce “Destroy the Radar Parts!”
}

death
{
	wm_announce "Radar parts destroyed!"
	trigger Radar_parts_toi remove
	wm_announce "The Allies have destroyed the Radar parts!"
	trigger game_manager allies_win

	
}

}

Radar_parts_toi
{
trigger remove
{
wm_announce “Radar parts destroyed!”
remove

}

}

pump_controls
{
spawn
{
wait 300
constructible_class 3 // 2=satchel 3=dyna
}

death
{
	alertentity pump_controls_bits
	trigger pump_controls_toi remove

	wm_announce "The Allies have destroyed the pump controls! Side wall breached!"
}

}

pump_controls_toi
{
trigger remove
{
remove
}
}

alliedconstruct_1
{
spawn
{
wait 50
trigger self setup
constructible_class 2 // 2=Satchel 3=Dyna
}

trigger setup
{
	setstate alliedconstruct_1_materials default	// Crate Models
	setstate alliedconstruct_1_clip default		// Clip brushes
	setstate alliedconstruct_1_flag default
}

built final
{
	setstate alliedconstruct_1_materials invisible	// Crate Models
	setstate alliedconstruct_1_clip invisible	// Clip brushes
	setstate alliedconstruct_1_flag invisible

	wm_announce "Assault Ladder constructed!"
}

decayed final
{
	trigger self setup
}

death
{
	trigger self setup
	wm_announce "Assault Ladder was destroyed!" 
}

}

This is the *.script file of the map.

The problem is with the Radar_parts section. I placed a few announces in the code, to track it, and it does spawn (Destroy radar parts announced), but it never triggers the death section of code… (Yes, I have tried to destroy it and it did blow up and dissapear but nothing happened after that).

The names in trigger and the brush are checked…

please help!..


(S14Y3R) #2
 death
{
wm_announce "Radar parts destroyed!" //<---
trigger Radar_parts_toi remove
wm_announce "The Allies have destroyed the Radar parts!"
trigger game_manager allies_win


} 

What type of entity is the Radar_parts? It is a regular solo func_constructible? or is this func_constructible targeting a script_mover.

Do you have a health key/value set in your Radar_parts entity? If no health is specified it has no idea when it is dead.

try removing the first wm_announce if that fails.

ps. forum code tags rule :slight_smile:


(==Troy==) #3

I know, I am just tooo tired… :frowning:

And yes, no health specified, but it is a satchel objective, and in tutorial prefab no health specified too. The pump contorls works perfectly, then I copied pump controls, changed the names and changed the bit from dyno to sathel… thats all… It is not a mover, it is a static brush + trigger pair.


(S14Y3R) #4

okies, since the death of the radar parts ends the map you don’t need to worry about removing the TOI at all. So after Satchelcharging your func_constructible all you actually need is:

 
death
{
trigger game_manager allies_win
}

try it without any wm_announcements or the reference to your toi remove code. If it doesn’t work it might be your entity. You do have an origin brush right? (sorry to ask, I don’t know you’re skill level) :wink:


(==Troy==) #5

My skill level is 0. This is my first test map :wink: So thank you for any help!.

And I do not have origin brush, as the prefab didnt have one. It is a simple box and a trigger box a bit bigger. thats it :slight_smile: I will try your suggestion and look at what will happen in a few hours :slight_smile: