Ending map without completing all objectives


(Victorianetza) #1

This is hopefully the last issue of my map, before the final release… but it changes the gameplay…so i will start with a brief explanation of the situation…:

my map consists of 6 main objectives; they are:

// 1: SECONDARY: Destroy the main entrance
		// 2: PRIMARY:   Steal the secret information
		// 3: PRIMARY:   Transmit the secret information
		// 4: Primary:   Steal the Gold
		// 5: Primary:   Secure the Gold
		// 6: Primary:   Steal the Gold #2
		// 7: Primary:   Secure the Gold #2

the map should end when the 2 gold crates are secured and the secret docs are transmitted by pressing a button, created by building one radar tower…
i looked in my example map, and made some variables:

//vars
		accum 3 set 0   // Allies have secured the gold ( 1= YES / 0=NO )
		accum 4 set 0   // Allies have secured the gold #2 ( 1= YES / 0=NO )
		accum 1 set 0   // Allies have secured the information ( 1= YES / 0=NO )
		accum 2 set 0	// The Radar is constructed ( 1= YES / 0= NO )
		accum 9 set 0   // check if button is pressed

then i made the map ending part:

trigger allies_win
	{
		accum 9 abort_if_equal 1
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 1
		accum 3 abort_if_equal 1
		accum 4 abort_if_equal 1

		accum 9 set 1 
		accum 3 set 1 
		accum 4 set 1 

		wm_setwinner	1
		wm_announce "Allied team has sent the secret information!"


		wm_objective_status 3 0 2
		wm_objective_status 3 1 1
		wm_objective_status 5 1 1
		wm_objective_status 5 0 2
		wm_objective_status 7 1 1
		wm_objective_status 7 0 2


		wait 1500
		wm_endround
	}

when the secret info is secured, in the script appears to be:

trigger documents_secured
	{
		wm_objective_status 2 1 1
		wm_objective_status 2 0 2

		wm_set_main_objective	3	0
		wm_set_main_objective	3	1

		accum 1 set 1

		wm_announce	"Allies have secured the secret documents!"
		wm_teamvoiceannounce 1 "islandfull_documents_secured"
		wm_teamvoiceannounce 0 "islandfull_documents_securedaxis"
	
	}

also for the 2 gold crates, i have:

....wm_announce "The Allied Team have secured the first gold crate!"
		wm_objective_status 5 1 1
		wm_objective_status 5 0 2

		wm_set_main_objective	2	0
		wm_set_main_objective	2	1

		accum 3 set 1

analogically for the other but not

accum 3 set 1

but

accum 4 set 1

the whole problem is that no matter the gold chests, the game ends when ONLY the secret info is secured; no matter if the gold is… I think i need to change something in the script, but i dont know what exactly… therefore i need help from U!


(nUllSkillZ) #2

I would not make it so complicated.
There are 3 objectives that have to be secured.
If this could be done in any order (e.g. gold2, docu’s, gold1) then I would use only one accum.
This accum should be initialized with zero.
And every time an objective is secured I would add one to this accum and would check if it equals 3.
If not abort.
If yes set the winner and end the game.


(Victorianetza) #3

hmm… the other thing i want to mention is that i am not a great in writing scripts… so… :uhoh:


(nUllSkillZ) #4

Don’t worry here’s a little script:


game_manager
{
	// ...

	accum 0 set 0

	// ...

	trigger allied_objectives
	{
		accum 0 inc 1

		accum 0 abort_if_not_equal 3

		wm_setwinner 1	// ALLIED ARE WINNER
		wm_endround	// end the round
	}

	// ...
}

// next is taken from Ifurita's tutorial page

//enter this as the scriptname value for the single trigger_flagonly_multiples entity
axis_docus
{ 
	death 
	{ 
		trigger game_manager allied_objectives 
	} 
} 

//enter this as the scriptname value for the single trigger_flagonly_multiples entity
axis_gold1
{ 
	death 
	{ 
		trigger game_manager allied_objectives 
	} 
} 

//enter this as the scriptname value for the single trigger_flagonly_multiples entity
axis_gold2
{ 
	death 
	{ 
		trigger game_manager allied_objectives 
	} 
}

Should work.
BTW I have taken a few lines from Ifurita’s page.
There are some good tutorials.


(Victorianetza) #5

sorry for this post :bored: … bug appeared :disgust: … umm read the next one


(Victorianetza) #6

thanks… i am interested why mine does not work, alhtough i tried to make it … it has all the variables, they change… but hey, will use the new one…hmm in that case i would have to delete the old one and use ifuritas :))


(nUllSkillZ) #7

I’ve just looked to you script.
And I’ve found:


trigger allies_win 
{ 
// ...
      accum 3 abort_if_equal 1 
      accum 4 abort_if_equal 1 
// ...
}

Why do ypu abort if the gold is secured?
Shouldn’t it be:


accum 3 abort_if_not_equal 1
accum 4 abort_if_not_equal 1


(Victorianetza) #8

oh… i will change it… did not notice it …hmmm…whats the difference?


(nUllSkillZ) #9

accum 3 abort_if_not_equal 1

This checks the value of accum 3.
If the value is not 1 the script / event will be stopped at this point.
Otherwise the next line is called.

You start with accum 3 = 0.
If the gold is secured you have accum 3 = 1.

Then in your script you have:


accum 3 abort_if_equal 1

So the script ends here although the gold is secured.


(Victorianetza) #10

i am almost sure, but tell me here on the last line:

wm_announce "The Allied Team have secured the first gold crate!"
		wm_objective_status 5 1 1
		wm_objective_status 5 0 2

		wm_set_main_objective	2	0
		wm_set_main_objective	2	1

		accum 3 set 1
wm_teamvoiceannounce 1 "islandfull_allies_gold1sec"
wm_teamvoiceannounce 0 "islandfull_axis_gold1sec"
	

setstate axis_gold_red invisible 
setstate axis_gold_captured default 
} 
} 
axis_objectives //enter this as the scriptname value for the single trigger_flagonly_multiples entity 
{ 
death 
{ 
trigger game_manager obj1 

i should have

trigger game_manager allies_win

no obj1(i dont have anything like obj1 in other places in my script…

trigger allies_win
	{
		accum 9 abort_if_equal 1
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 1
		accum 3 abort_if_not_equal 1
		accum 4 abort_if_not_equal 1

		accum 9 set 1 
		accum 3 set 1 
		accum 4 set 1 

		wm_setwinner	1
		wm_announce "Allied team has sent the secret information!"


		wm_objective_status 3 0 2
		wm_objective_status 3 1 1
		wm_objective_status 5 1 1


(nUllSkillZ) #11

Yes instead of obj1 write allies_win.

But you should try this first:
Leave your script as it has been (1st post).
And try to change only the 2 lines concerning accum 3 and 4.


(Victorianetza) #12

i did it… now the game does not let me to push the button to end the game…


(nUllSkillZ) #13

Is it possile to post your whole script.
If accum 9 is also a yes = 1 and no = 0 then I think it has to be changed also to:


accum 9 abort_if_not_equal 1


(Victorianetza) #14

ok… heres the whole script, i hope u can find out the mistake :smiley:

////////////////////MANAGER
game_manager
{
	spawn
	{	
		// Game rules
		wm_axis_respawntime	20
		wm_allied_respawntime	20
		wm_number_of_objectives 7
		wm_set_round_timelimit	35

		// Objectives
		// 1: SECONDARY: Destroy the main entrance
		// 2: PRIMARY:   Steal the secret information
		// 3: PRIMARY:   Transmit the secret information
		// 4: Primary:   Steal the Gold
		// 5: Primary:   Secure the Gold
		// 6: Primary:   Steal the Gold #2
		// 7: Primary:   Secure the Gold #2

		// Current main objectives for each team (0=Axis, 1=Allies)
		wm_set_main_objective		1	0
		wm_set_main_objective		1	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 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
		wm_objective_status 4 1 0
		wm_objective_status 4 0 0
		wm_objective_status 5 1 0
		wm_objective_status 5 0 0
		wm_objective_status 6 1 0
		wm_objective_status 6 0 0
		wm_objective_status 7 1 0
		wm_objective_status 7 0 0



		//If the time is up, the winner is axis
		wm_setwinner 0

		//Wait
		wait 500
		wm_teamvoiceannounce 1 "islandfull_wall_destroy"
		wm_teamvoiceannounce 0 "islandfull_wall_defend"
		wm_teamvoiceannounce 1 "islandfull_side_destallies"
		wm_teamvoiceannounce 0 "islandfull_side_defaxis"
		wm_teamvoiceannounce 0 "islandfull_temple_defend"
		wm_teamvoiceannounce 1 "islandfull_temple_allies"
		wm_teamvoiceannounce 0 "islandfull_axis_golddef"
		wm_teamvoiceannounce 1 "islandfull_allies_goldget"

		

		//vars
		accum 3 set 0   // Allies have secured the gold ( 1= YES / 0=NO )
		accum 4 set 0   // Allies have secured the gold #2 ( 1= YES / 0=NO )
		accum 1 set 0   // Allies have secured the information ( 1= YES / 0=NO )
		accum 2 set 0   // The Radar is constructed ( 1= YES / 0= NO )
		accum 9 set 0   // check if button is pressed
	} 
	trigger allies_win
	{
		accum 9 abort_if_equal 1
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 1
		accum 3 abort_if_not_equal 1
		accum 4 abort_if_not_equal 1

		accum 9 set 1 

		wm_setwinner	1
		wm_announce "Allied team has sent the secret information!"


		wm_objective_status 3 0 2
		wm_objective_status 3 1 1
		wm_objective_status 5 1 1
		wm_objective_status 5 0 2
		wm_objective_status 7 1 1
		wm_objective_status 7 0 2


		wait 1500
		wm_endround
	}
	trigger allies_destroy_fortwall
	{
		wm_objective_status 1 1 1
		wm_objective_status 1 0 2

		wm_set_main_objective		2	0
		wm_set_main_objective		2	1
		wm_set_main_objective		4	0
		wm_set_main_objective		4	1
		wm_set_main_objective		6	0
		wm_set_main_objective		6	1


		trigger temple_flag force_allied
		trigger temple_flag kill

		setautospawn	"Desert"	    0
		setautospawn	"Old City Hall"  	    1

		alertentity boats_allies_spawns
		setstate boatsblob 	invisible

		wm_announce	"Allies have breached the Fortress Wall!"
		wm_teamvoiceannounce 1 "islandfull_wall_destrallies"
		wm_teamvoiceannounce 0 "islandfull_wall_destraxis"


		wait 1000
	}
	trigger documents_secured
	{
		wm_objective_status 2 1 1
		wm_objective_status 2 0 2

		wm_set_main_objective	3	0
		wm_set_main_objective	3	1

		accum 1 set 1

		wm_announce	"Allies have secured the secret documents!"
		wm_teamvoiceannounce 1 "islandfull_documents_secured"
		wm_teamvoiceannounce 0 "islandfull_documents_securedaxis"
	
	}
	trigger radara_built
	{
		accum 2 set 1
		wm_announce "The Radar has been constructed" 
	}
	trigger radara_destroyed
	{
		accum 2 set 0
		wm_announce "The Radar has been destroyed"
	}
}
//Gold 
axis_gold 
{ 
spawn 
{ 
wait 200 
setstate axis_gold_captured invisible 
} 
trigger stolen 
{ 
		wm_objective_status 4 1 1
		wm_objective_status 4 0 2

		wm_set_main_objective	5	0
		wm_set_main_objective	5	1

wm_announce 1 "Return the Axis gold to the treasure room" 
wm_announce 0 "The Allied forces have stolen the first gold crate!"
wm_teamvoiceannounce 1 "islandfull_allies_gold1taken"
wm_teamvoiceannounce 0 "islandfull_axis_gold1taken"
setstate axis_gold_cm_marker invisible 
} 
trigger returned 
{ 
wm_announce 1 "The Axis have retrieved the gold" 
wm_announce 0 "Gold returned! Protect the gold" 
wm_teamvoiceannounce 1 "islandfull_allies_gold1ret"
wm_teamvoiceannounce 0 "islandfull_axis_gold1ret"

setstate axis_gold_cm_marker default 
} 
trigger captured 
{ 
wm_announce "The Allied Team have secured the first gold crate!"
		wm_objective_status 5 1 1
		wm_objective_status 5 0 2

		wm_set_main_objective	2	0
		wm_set_main_objective	2	1

		accum 3 set 1
wm_teamvoiceannounce 1 "islandfull_allies_gold1sec"
wm_teamvoiceannounce 0 "islandfull_axis_gold1sec"
	

setstate axis_gold_red invisible 
setstate axis_gold_captured default 
} 
} 
axis_objectives //enter this as the scriptname value for the single trigger_flagonly_multiples entity 
{ 
death 
{ 
trigger game_manager obj1
} 
} 
//Gold 
axis_gold2
{ 
spawn 
{ 
wait 200 
setstate axis_gold2_captured invisible 
} 
trigger stolen 
{ 
		wm_objective_status 6 1 1
		wm_objective_status 6 0 2

		wm_set_main_objective	7	0
		wm_set_main_objective	7	1

wm_announce 1 "Return the Axis gold to the treasure room" 
wm_announce 0 "The Allied forces have stolen the second gold crate!!"
wm_teamvoiceannounce 1 "islandfull_allies_gold2taken"
wm_teamvoiceannounce 0 "islandfull_axis_gold2taken"
setstate axis_gold2_cm_marker invisible 
} 
trigger returned 
{ 
wm_announce 1 "The Axis have retrieved the second gold crate" 
wm_announce 0 "Gold returned! Protect the gold" 
wm_teamvoiceannounce 1 "islandfull_allies_gold2ret"
wm_teamvoiceannounce 0 "islandfull_axis_gold2ret"

setstate axis_gold2_cm_marker default 
} 
trigger captured 
{ 
wm_announce "The Allied Team have secured the second gold crate!"
		wm_objective_status 7 1 1
		wm_objective_status 7 0 2

		wm_set_main_objective	2	0
		wm_set_main_objective	2	1

		accum 4 set 1
wm_teamvoiceannounce 1 "islandfull_allies_gold2sec"
wm_teamvoiceannounce 0 "islandfull_axis_gold2sec"
	

setstate axis_gold2_red invisible 
setstate axis_gold2_captured default 
} 
} 
axis_objectives2 //enter this as the scriptname value for the single trigger_flagonly_multiples entity 
{ 
death 
{ 
trigger game_manager obj1
} 
} 


// ============================================================================
// ============================================================================
// OLD CITY HALL spawn point - Initially owned by Axis
//
// ============================================================================
temple_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 Old City Hall
		wm_teamvoiceannounce 1 "islandfull_temple_capt"
		wm_teamvoiceannounce 0 "islandfull_temple_axis"


		alertentity temple_wobj		// Switch command map marker
		setautospawn "Old City Hall"	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 Old City Hall!"
		wm_teamvoiceannounce 1 "islandfull_temple_cap"
		wm_teamvoiceannounce 0 "islandfull_temple_cap"
		wm_teamvoiceannounce 1 "islandfull_documents_steal"
		wm_teamvoiceannounce 0 "islandfull_documents_defend"


		alertentity temple_wobj		// Switch command map marker
		setautospawn "Old City Hall"	1	// Set Allies to forward spawn
	}

	trigger force_allied
	{
		accum 0 abort_if_equal 1 		// Do Allies own the flag?
		alertentity temple_wobj		// Switch command map marker
		alertentity temple_spawns		// Switch all spawnpoints
		setautospawn "Old City Hall"	1	// Set Allies to forward spawn
	}
	trigger kill
	{
		remove				// Remove self (flag model)
	}
}

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

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

		wm_announce "Allies have destroyed the Fortress wall!"
		wm_teamvoiceannounce 1 "islandfull_wall_destrallies"
		wm_teamvoiceannounce 0 "islandfull_wall_destraxis"
	}
}
documents
{
	death
	{
		trigger game_manager documents_secured
		setstate documents_secured_model default
		setstate documents_secured_clip default	
	}	
}
// ============================================================================
// ============================================================================
// MG42 Bunker spawn point - Initially owned by Axis
//
// ============================================================================
mg42_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 MG 42 Bunker!"


		alertentity mg42_wobj		// Switch command map marker
		setautospawn "MG42 Bunker"	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 MG42 Bunker!"

		alertentity mg42_wobj		// Switch command map marker
		setautospawn "MG42 Bunker"	1	// Set Allies to forward spawn
	}

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

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

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

		wm_announce "Allies have destroyed the Side Entrance!"
		wm_teamvoiceannounce 1 "islandfull_side_destrallies"
		wm_teamvoiceannounce 0 "islandfull_side_destaxis"
	}
}

/////////////////////////////////////////////////
//NEUTRAL COMMAND POST
////////////////////////////////////////////////
allied_compost_built
{
	spawn
	{
		wait 400
		trigger allied_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
		setstate allied_compost_built_model underconstruction
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate allied_compost_built_model default
		setstate neutral_compost_closed invisible
		setstate neutral_compost_closed_model invisible

		trigger allied_compost_built_model enable_allied_features

		enablespeaker allies_compost_sound
	}

	decayed final
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed default
		setstate neutral_compost_closed_model default

		trigger allied_compost_built_model disable_allied_features

		disablespeaker allies_compost_sound
	}
}

allied_compost_built_model
{
	spawn
	{
		wait 400
		setstate allied_compost_built_model invisible
	}

	trigger enable_allied_features
	{
		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.75
		setchargetimefactor 1 covertops 0.75
		sethqstatus 1 1

		wm_announce	"Allied Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

	}

	trigger disable_allied_features
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0

		wm_announce	"Axis team has destroyed the Allied Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
		// *---------------------------------------------------------------------------------*

	}
}

axis_compost_built
{
	spawn
	{
		wait 400
		trigger axis_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		setstate axis_compost_built_model underconstruction
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate axis_compost_built_model default
		setstate neutral_compost_closed invisible
		setstate neutral_compost_closed_model invisible

		trigger axis_compost_built_model enable_axis_features

		alertentity 	temple_spawns
		setstate    	axis_comm_post default

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed default
		setstate neutral_compost_closed_model default

		trigger axis_compost_built_model disable_axis_features

		alertentity 	temple_spawns
		setstate 	axis_comm_post invisible

		disablespeaker axis_compost_sound
	}
}

axis_compost_built_model
{
	spawn
	{
		wait 400
		setstate axis_compost_built_model invisible
	}

	trigger enable_axis_features
	{
		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75
		sethqstatus 0 1

		wm_announce	"Axis Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
		// *---------------------------------------------------------------------------------*
	}

	trigger disable_axis_features
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0

		wm_announce	"Allied team has destroyed the Axis Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"

		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*
	}
}

//Constructions
//Allied Foot Bridge
hangbridge
{ 
   spawn 
   { 
      wait 200 
      constructible_class 3 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate hangbridge default 
      setstate hangbridge_materials invisible
	setstate hangbridge_materials_clip invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Allied team has built the Foot Bridge" 
   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has destroyed the Foot Brudge" 
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate hangbridge invisible
      setstate hangbridge_materials default
	setstate hangbridge_materials_clip default
   } 
}

////axis most
axisbridge
{ 
   spawn 
   { 
      wait 200 
      constructible_class 3 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate construction_track invisible
      setstate construction_materials invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has built the Bridge!"
	wm_teamvoiceannounce 1 "islandfull_axisbridge_cons"
	wm_teamvoiceannounce 0 "islandfull_axisbridge_cons" 
   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Allied team has destroyed the bridge!"
	wm_teamvoiceannounce 1 "islandfull_axisbridge_dest"
	wm_teamvoiceannounce 0 "islandfull_axisbridge_dest"   
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate construction_track default 
      setstate construction_materials default 
   } 
} 

////allied Bridge
alliesbridge
{ 
   spawn 
   { 
      wait 200 
      constructible_class 3 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate bridge2 default 
      setstate construction_materials2 invisible 
	setstate construction_materials2_clip invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Allied team has built the Bridge!"
	wm_teamvoiceannounce 1 "islandfull_alliesbridge_cons"
	wm_teamvoiceannounce 0 "islandfull_alliesbridge_cons"

   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has destroyed the Allied Bridge!"
	wm_teamvoiceannounce 1 "islandfull_alliesbridge_dest"
	wm_teamvoiceannounce 0 "islandfull_alliesbridge_dest" 
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate bridge2 invisible
      setstate construction_materials2 default 
	setstate construction_materials2_clip default
   } 
}
//Allies Radar
radara
{ 
	spawn 
	{ 
		wait 200 
		trigger self setup 

		constructible_class 3 
	} 

	trigger setup 
	{ 
		setstate radara invisible

		setstate radara_stuff invisible	// hide radara stuff
		setstate finish_mission1 invisible 	// hide button trigger
		setstate finish_mission invisible	// hide button

		setstate radara_materials default 
		setstate radara_materials_clip default
		setstate radara_flag default 
	} 

	buildstart final 
	{ 
		setstate radara underconstruction

		setstate radara_stuff underconstruction   // trans antenna stuff
		setstate finish_mission underconstruction  // trans button 

		setstate radara_materials default 
		setstate radara_materials_clip default
		setstate radara_flag default 
	} 

	built final 
	{ 
		setstate radara default 

		setstate radara_stuff   default // show radara stuff
		setstate finish_mission1 default // show button trigger
		setstate finish_mission  default // show button

		setstate radara_materials invisible
		setstate radara_materials_clip invisible
		setstate radara_flag invisible 

		wm_teamvoiceannounce 1 "islandfull_radar_con"
		wm_teamvoiceannounce 0 "islandfull_radar_cons"

		trigger game_manager radara_built
		trigger finish_mission1 vis
		alertentity radio_speaker
	} 

	decayed final 
	{ 
		setstate radara invisible 

		setstate radara_stuff invisible	// hide radara stuff
		setstate finish_mission1 invisible 	// hide button trigger
		setstate finish_mission invisible	// hide button

		setstate radara_materials default
		setstate radara_materials_clip default 
		setstate radara_flag default 
	} 

	death 
	{ 
		setstate radara invisible

		setstate radara_stuff invisible	// hide antenna stuff
		setstate finish_mission1 invisible 	// hide button trigger
		setstate finish_mission invisible	// hide button

		setstate radara_materials default
		setstate radara_materials_clip default 
		setstate radara_flag default
		
		wm_teamvoiceannounce 1 "islandfull_radar_dest"
		wm_teamvoiceannounce 0 "islandfull_radar_dest"
	 

		trigger game_manager radara_destroyed
		trigger finish_mission1 invis 
		alertentity radio_speaker
	} 
}
finish_mission1
{
	spawn
	{
		wait 400
		setstate self invisible	
		setstate documents_secured_model underconstruction
		setstate documents_secured_clip invisible

		accum 5 set 0 // 0=invisible / 1=visible
	}
	trigger main
	{
		accum 5 abort_if_not_equal 1
		trigger game_manager allies_win
	}
	trigger vis
	{
		accum 5 set 1
	}
	trigger invis
	{
		accum 5 set 0
	}
}
finish_mission
{
	spawn
	{
		wait 400
		setstate self invisible
	}
}
radio_speaker
{
	spawn
	{
		wait 400
		alertentity radio_speaker
	}
}

//Axis wAtch Tower1
kyla1
{ 
   spawn 
   { 
      wait 200 
      constructible_class 2 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate tower1 default 
      setstate construction_materials3 invisible 
	setstate construction_materials3_clip invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has built the Watchtower" 
   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Allied team has destroyed the Axis Watchtower" 
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate tower1 invisible
      setstate construction_materials3 default
	setstate construction_materials3_clip default 
   } 
}

//Axis wAtch Tower2
kyla2
{ 
   spawn 
   { 
      wait 200 
      constructible_class 2 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate tower2 default 
      setstate construction_materials4 invisible 
	setstate construction_materials4_clip invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has built the Second WatchTower" 
   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Allied team has destroyed the Axis Watchtower" 
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate tower2 invisible
      setstate construction_materials4 default 
	setstate construction_materials4_clip default 
   } 
}

//gate dynamite
//gate1
gate1
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up the Axis Frontier gate!"
	wm_teamvoiceannounce 1 "islandfull_side_destrallies"
	wm_teamvoiceannounce 0 "islandfull_side_destaxis"
   }
}

//fortwall
fortwall
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
	trigger game_manager allies_destroy_fortwall
      wm_announce "Allies have blown up the Axis Fortress Wall"
	wm_teamvoiceannounce 1 "islandfull_wall_destrallies"
	wm_teamvoiceannounce 0 "islandfull_wall_destraxis"
   }
}
//kanal exit
kanal1
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up the Axis Tunnel Exit"
   }
}


(Ifurita) #15

The other way you can do this is to use an accum to track how many gold crates are secured, then only activate the docs when both crates are secured. This forces the attackers to secure both crates THEN secure and transmit docs. We did a similar thing in Vengeance, where you can only blow up a rocket after the codes are capped, and the game is won when both rockets are destroyed.

Therefore, you have 4 objectives, but there is a sequence to them and you cannot prematurely blow up the rockets without having first capped the codes


(Victorianetza) #16

um, can u say it in a scripting waY?


(Ifurita) #17

Something like this:


trigger axisgoldcounter  //# of gold boxes secured
        {
        //Set accum to increase by 1 so we know that a gold box has been secured
        accum 2 inc 1

       //Call function called goldcheck in game_manager to check if all gold boxes have been secured
        trigger game_manager goldcheck

trigger goldcheck // checks to see if documents should be enabled
       {
       accum 2 abort_if_not_equal 2

       setstate documents_toi default //assuming this is the name of your docs TOI
       setstate documents_cm default //assuming this is the name of your docs cm marker
       setstate documents_transred default //the red marker at the drop off location
       }

I’m kind of writing this out of my ass, so it might not be right


(Victorianetza) #18

tnx Ifurita, really tnx… i have one more question:

is it important for this to be in sequence?

trigger allies_win
{
accum 9 abort_if_equal 1
accum 1 abort_if_not_equal 1
accum 2 abort_if_not_equal 1
accum 3 abort_if_not_equal 1
accum 4 abort_if_not_equal 1


(Ifurita) #19

//vars
accum 3 set 0 // Allies have secured the gold ( 1= YES / 0=NO )
accum 4 set 0 // Allies have secured the gold #2 ( 1= YES / 0=NO )
accum 1 set 0 // Allies have secured the information ( 1= YES / 0=NO )
accum 2 set 0 // The Radar is constructed ( 1= YES / 0= NO )
accum 9 set 0 // check if button is pressed

  1. Well, the way I see it, gold 1 and 2 are not independant events. You either have both secured or you don’t, so you can use a single accum to track progress
  2. Based on completion of the 2 gold objectives, the documents become visible
  3. YOu could use the same scripting structure to determine if the button is activated or not. Use a single accum to track when the documents are capped AND the radar is built. When the accum value = 2, then the button becomes activated
  4. When the button becomes activated, it would just activate an alliedgamewin script - no need for another accum to track this.

Overall, your string of objectives might be too complicated - think about the game play and how people will progress thru the map


(nUllSkillZ) #20

I’ve found out that you use accum’s wrong.
Each script-block has it’s own accum’s.
So the accum 3 that you use in the “game_manager”-script-block is not the same accum 3 that you use in the “axis_gold”-script-block.

If you want to change accums that are not part of the same script-block you must use globalaccum’s.