Now for some reason, the allies can steal the same document over an over just by hitting the use key on the place the document was, even after it's hidden the first time. If they do it 4 times, they get 4 points and they win the battle. How do I make it so each of the three documents can only be stolen once? Here's the complete script:
Code: Select all
// Objective: Bunkers
// ARCHITECTURE: GoldenEye
// SCRIPTING: GoldenEye
main:
setcvar "g_obj_alliedtext1" "Destroy the Flak"
setcvar "g_obj_alliedtext2" "Steal the Documents"
setcvar "g_obj_alliedtext3" "Kill the Axis"
setcvar "g_obj_axistext1" "Defend the Flak"
setcvar "g_obj_axistext2" "Protect the Documents"
setcvar "g_obj_axistext3" "Kill the Allies"
setcvar "g_scoreboardpic" "loading"
level waittill prespawn
exec global/DMprecache.scr
exec global/door_locked.scr::lock
exec global/ambient.scr Obj_Bunkers
level.script = maps/obj/Obj_Bunkers.scr
level waittill spawn
$document1_trigger setthread objective1
$document2_trigger setthread objective2
$document3_trigger setthread objective3
level.obj_to_achieve = 4
level.obj_done = 0
level.bomb_damage = 200
level.bomb_explosion_radius = 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
level waittill roundstart
// Set the parameters for round based match
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker
$flak88_explosive1 thread axis_win_timer
thread check_if_my_bomb_exploded
end // end of main
check_if_my_bomb_exploded:
while (true)
{
if ($flak88_explosive1.exploded ==1)
{
thread bomb_obj_done
}
wait 5
}
end
bomb_obj_done:
if(level.point_added !=1)
{
level.point_added = 1
iprintlnbold "The Flak has been destroyed!"
level.obj_done++
thread win_status
}
end
objective1:
if (parm.other.dmteam == allies)//chose the team
{
$document1 hide
$document1 playsound pickup_papers1
level.obj_done++ //That will add 1 point
iprintlnbold "A document has been stolen!"
}
thread win_status
end
objective2:
if (parm.other.dmteam == allies)//chose the team
{
$document2 hide
$document2 playsound pickup_papers1
level.obj_done++ //That will add 1 point
iprintlnbold "A document has been stolen!"
}
thread win_status
end
objective3:
if (parm.other.dmteam == allies)//chose the team
{
$document3 hide
$document3 playsound pickup_papers1
level.obj_done++ //That will add 1 point
iprintlnbold "A document has been stolen!"
}
thread win_status
end
win_status:
if(level.obj_done == level.obj_to_achieve)
{
teamwin allies
}
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end


