Dynamite Objective in my spawn+constrution map not working


(smallwood2000) #1

I added to a pre made a objective for the allies to destroy, I already had inside this map a forward spawn point and a construct area that works thnx to you guys,

I have hit a new problem,

I took my working map from before
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=11913

And added a brush that i wont the allies to blow up and win the game

but i hit a error i just cant seem to get around

Ive added to my map a brush that i wont the allies to blow up and win the game this brush is wot the axis is defending.

I made this brush a Func_explosive with the following entitles

Dmg 750
mass 100
targetname bomb
scriptname bomb
health 0
classname func_explosive

I then surounded this with a trigger with the following entitles.

HAVE CLICKED AXIS OBJECTIVE AND IS OBJECTIVE

classname trigger_objective_info
target bomb
spawnflags 17

For the script i took my orignal script and amended it with the etdo1 script i took out the bit for fe_fuel_depot and rename it to bomb and amended to wot i though wos neccesary

game_manager
{
spawn
{
wait 150 //Let the game rest for a sec.

wm_axis_respawntime 16
wm_allied_respawntime 16
wm_set_round_timelimit 20
setautospawn "Forward Spawn"	0	// Set Axis to forward spawn


		wm_number_of_objectives 1

		// Objective overview status indicators
		//wm_objective_status <objective>
		//                    <team (0=Axis, 1=Allies)>
		//                    <status (0=neutral 1=complete 2=failed)>

		wm_objective_status 1 0 0
		wm_objective_status 1 1 0
		}
}

// ============================================================================
// Forward Spawn point - Initially owned by Axis
//
// ============================================================================
forwardspawn1_flag
{
	spawn
	{
		accum 0 set 0			// Who owns flag: 0-Axis, 1-Allied
	}

	trigger axis_capture				// Touched by an Axis player
	{
		accum 0 abort_if_equal 0 		// do Axis own flag?

		accum 0 set 0 			// Axis own the flag
		wm_announce "Axis reclaim the Forward Spawn!"

		alertentity forwardspawn1_wobj		// Switch command map marker
		setautospawn "Forward Spawn"	0	// Set Axis to forward spawn
	}

	trigger allied_capture				// Touched by an allied player
	{
		accum 0 abort_if_equal 1 		// do Allies own flag?

		accum 0 set 1 			// Allied own the flag
		wm_announce "Allies capture the Forward Spawn!"

		alertentity forwardspawn1_wobj		// Switch command map marker
		setautospawn "Forward Spawn"	1	// Set Allies to forward spawn
	}

	trigger force_allied
	{
		accum 0 abort_if_equal 1 		// Do Allies own the flag?
		alertentity forwardspawn1_wobj		// Switch command map marker
		alertentity forwardspawn1_spawns		// Switch all spawnpoints
		setautospawn "Forward Spawn"	1	// Set Allies to forward spawn
	}
	trigger kill
	{
		remove				// Remove self (flag model)
	}
}

dynamiteobj1
{
	spawn
	{
		wait 100				// Wait for all entities to spawn
		constructible_class 3			// Dynamite only
	}

	death
	{
		trigger forwardspawn1_flag force_allied 	// Switch forward spawn to Allied ONLY
		trigger forwardspawn1_flag kill		// Remove entities
		setstate forwardspawn1_base invisible	// Remove base of flag

		wm_announce "Allies have destroyed the Dynamite Objective 1"
	}
}
fence
{
spawn
{
wait 200
constructible_class 2 //Satchel-able objective.
constructible_constructxpbonus 1
}

built final
{
setstate fence default
setstate fence_materials invisible
}

decayed final
{
setstate fence invisible
setstate fence_materials default
}

buildstart final //I'm not sure if this is necessary.
{
setstate fence underconstruction //Include it anyway.
setstate fence_materials default
}

death
{
setstate fence_materials default
wm_announce "The Fence has been destroyed!"
}

bomb
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		wm_announce	"The Axis Fuel Depot destroyed!"

		wait 50

		wm_announce	"Round end!"

		wm_objective_status 1 0 2
		wm_objective_status 1 1 1

		// Set the round winner:  0 == AXIS, 1 == ALLIED
		wm_setwinner 1

		// End the round
		wm_endround

		// Dynamite effects
		setstate fs_fire  default
		setstate ts_smoke default
		alertentity td_explosion
	}
}

I have been trying at this for ages but i cant see the prob

im a very stupid newbie plz help


(smallwood2000) #2

sorry bout posting so many times after i clicked submit i went bk the the main page so i didnt think to check to i just clicked back and submit again sorry again


(TFate) #3

It would help if you specified what the error is.

Remove the key/value “health 0” from the func_explosive. You’re not supposed to use it for dynamite objectives in ET.


(smallwood2000) #4

ERROR G_script_scriptphase() error (line 120) : unknown event bomb

and my scriptname for the dynamtite brush is scriptname bomb

cheers


(smallwood2000) #5

I removed the health entitlement and renamed the scriptname to bomb_ob and inside script checking for caps
the same error message appears

ERROR G_script_scriptphase() error (line 120) : unknown event bomb_ob

cheers


(Ifurita) #6

Your braces are not paired up correctly, I believe the script thinks ‘bomb’ is part of the constructible


(smallwood2000) #7

ok so how would i sort this out i really dont understand script that welll at all

sorry i just a newbie


(smallwood2000) #8

thank u so much i added a extra } at the end of my fence script the map now works fine, expect one last error,

After the allies blow up the final objective and win the game a error message appears,

G_Scripting : alertentity cannot find targetname “td_explosion”

I think i have to set something up for the explosion thats written in my script since i cannot open the etdo.bsp file as a map i realise there is a way but 2 comples for me i dont know what 2 do,

once again cheers


(smallwood2000) #9

fixed the porblem so simple beyond belife i just simple remove the alertenity line from my script at the end and the allies win the game.

Thank u for the help.

ill try and put this into a tutorial with aproiate thnx on my web site