stealing documents objective ends automatically
Posted: Sun Jan 11, 2004 8:52 pm
when i go to play my objective map on LAN, i have one player on Allies and one player on Axis but as soon as the round starts, it automatically says Allies Win. Heres my script:
Code: Select all
// L33t
// ARCHITECTURE: "SFD" homeboy
// SCRIPTING: "SFD" homeboy
// EMAIL: guitarmusicz09@nc.rr.com
main:
setcvar "g_obj_alliedtext1" "- Steal the documents"
setcvar "g_obj_alliedtext2" "From axis base."
setcvar "g_obj_alliedtext3" "- One document is fake..."
setcvar "g_obj_axistext1" "- Prevent the allies"
setcvar "g_obj_axistext2" "from stealing the"
setcvar "g_obj_axistext3" "documents."
setcvar "g_scoreboardpic"
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/l33t.scr
exec global/ambient.scr l33t
level waittill spawn
// 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
// level waittill roundstart
thread desk_document_check // Start the win check thread for allies
level waittill axiswin // If the end of the match is reached, the Axis win
end // end of main
// Document checks
desk_document_check:
while(1)
{ // As long as 1 equals 1 ( that would be forever ) $documents_trigger waittill trigger // Dont execute past this line until someone triggers the object
if (parm.other.dmteam == allies)
{ // parm.other is the triggerer ( testing here to ensure only allies can complete the ojective )
$documents hide // Make the document graphix disappear
break // break out of the while loop
}
waitframe // protection against making this thread use too much CPU
}
teamwin allies // Make allies win the match
end // end allies victory test