Ok i posted at planetwolfenstein but not much luck there so im hopin u guys can help…
http://www.forumplanet.com/planetwolfenstein/topic.asp?fid=4420&tid=1170143
Ok i posted at planetwolfenstein but not much luck there so im hopin u guys can help…
http://www.forumplanet.com/planetwolfenstein/topic.asp?fid=4420&tid=1170143
First off, yes you need only one game_manager section. Second, I believe wm_set_objective_status x x is now changed to wm_objective_status x x x - check the ET level designer reference guide from with radiant. So change all those.
trigger checkgame
{
accum 1 abort_if_not_equal 1
accum 2 abort_if_not_equal 1
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
wait 1500
// End the round
wm_endround
}
trigger checkgame first checks if accum 1 is equal to 1 or not. If it’s not, then it doesn’t do anymore of this trigger. Now, accum 1 is set to 0 initially. Then in trigger objective1
trigger objective_1
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of objective #1
wm_set_objective_status 1 1
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 0
// Some kind of UI pop-up to alert players
wm_announce "Allied team has destroyed percy!! no!!!!"
// Call function to check if the round has been won
trigger game_manager checkgame
}
accum 1 is set to 0 again if the first object is destroyed. So, when checkgame is called, accum 1 is not 1, so it exits. Change the line ‘accum 1 set 0’ to ‘accum 1 set 1’ in trigger objective1. Then if both objective1 and objective2 have been destroyed, the axis team is the winner and the round should end.
Also, you need to ‘merge’ the scripting sections for main_obj1 and side_obj2. You’ve got two sections named the same thing - I don’t know the ramifications of this, but it can’t be good…
So do something like this:
main_obj1 //
{
spawn
{
wait 200
constructible_class 3
}
death
{
wm_announce "Axis have destroyed the main entrance!"
trigger game_manager objective_1
}
}
side_obj2
{
spawn
{
wait 200
constructible_class 3
}
death
{
wm_announce "Axis have destroyed the side entrance!"
trigger game_manager objective_2
}
}
A little explanation: when main_obj1 is destroyed the main_obj1 death script section is called. This first sends a message to the screen. It then calls game_manager objective1 script section. This trigger sends some messages, sets accum 1 = 1 (after you fix it) then calls checkgame. If both objectives are destroyed (accum 1 = 1 and accum 2 = 1) then axis win and the round ends. If either objective is not destroyed, then the checkgame trigger doesn’t end the round yet.
Hope this helps…