objective status meh?


(patatoeswizard) #1

okay im a noob and have been painstakingly searching and reading and trying to comprehend all this scripting and entity rubbish - im used to nice simple triggers and such like starcraft and what not- well anyway i copied the battery script and im confused yet again- after wm_objective_status theres a set of 3 numbbers - the first i understand to be the number of the objective but with the next two i kno 1=succeeded 2=failed 0=default and im guessing one for allies one for axis but which is which? and could someone please explain why i always see two of them in a row like
"trigger westbunker_flagblue
{
// Some kind of UI pop-up to alert players
wm_announce “Allies capture the Forward Bunker!”

	wm_objective_status	3 1 1
	wm_objective_status	3 0 2
}"

i know someone else probably already asked this and you’re all annoyed with these newblar ?s but i looked through all the tutorials and searched the forums and havent really found anything- also any futher explenation on scripting objectives would be nice- preferably a connection to the simple trigger systems im used to like in craft and age of empires
basically i just wanna get this thing up and running to play w/ my friends- but i guarantee im gonna need something else like putting it into a campaign and what not but for now the objective info would be nice


(patatoeswizard) #2

oh yeah and here my beauty of a script so far
//
// Map: Stockyard
// BSP: stockyard

game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 30
wm_allied_respawntime 20
wm_number_of_objectives 6
wm_set_round_timelimit 20
}
}

trigger klobb_flagblue
{
// Some kind of UI pop-up to alert players
wm_announce “Allies reached the deployed klobb!”

	wm_objective_status	3 1 0
	wm_objective_status	3 0 0
}

from the looks of it im guessing theres quite a bit missing and i gotta change all the numbers its copied right from battery


(Lanz) #3

Here’s how it works:

wm_objective_status <objective> <team> <status>

Objective: a value from 1 to 8 (If I remember corectly)
team: 0 = Axis, 1 = Allies
Status: 0 = Default, 1 = Succeeded, 2 = Failed.

So the reason that you see them in groups of two in many of the situations is that you need to change the status of the objective for both teams at once.

For example if objective 3 is that Allies should blow a door and Axis should defend it, if it’s blown then you do like this:

wm_objective_status 3 0 2 <- Axis failed to defend the door.
wm_objective_status 3 1 1 <- Allies succeeded to blow up the door.

This one would just reset the objective for both sides:
wm_objective_status 3 0 0
wm_objective_status 3 1 0

hth


(patatoeswizard) #4

thanx for the quick response - makes sense now thanx a bundle


(patatoeswizard) #5

well heres what ive come up with i havent tried it yet because i dont wanna have to deal with restarting my comp yet again -im a lazy lazy man what can i say
"
//
// Map: Stockyard
// BSP: stockyard

game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 15
wm_allied_respawntime 10
wm_number_of_objectives 2
wm_set_round_timelimit 20
}

trigger klobb_flagblue
{
// Some kind of UI pop-up to alert players
wm_announce “Allies reached the deployed klobb!”

	wm_objective_status	1 1 1
	wm_objective_status	1 0 2
}

trigger databox_flagred
{
// Some kind of UI pop-up to alert players
wm_announce “Allies destroyed the databox!”

	wm_objective_status	2 1 1
	wm_objective_status	2 0 2

            accum 1 set 1				// End of game completed

	// Call function to check if the round has been won
	trigger game_manager checkgame
}

trigger timelimit_hit
{
	wm_announce	"Allies failed to destroy the data box."

	wait 8000
	
	accum 2 set 1

	triger game_manager checkgame
}

trigger checkgame
{
	accum 1 abort_if_not_equal 1

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

	// End the round
	wm_endround

	accum 2 abort_if_not_equal 1

	wm_setwinner 0

	wm_endround
}

}
"
-well does that make sense/work? :???: