Ok, I read over the tutorial for multiple objectives and got confused on this:
In the single doc. tut, it has desk_document check, do i replace that line with simply document_check: for doing multiple documents.
Also, does the
$documents_trigger thread document_check
line replace the
thread desk_document_check
beneath the level waittil roundstart?
And lastly, do i just add as many of those as there are documents. For example:
level waittill roundstart
$documents_trigger thread document_check
$documents2_trigger thread document_check
Multiple Document Objective
Moderator: Moderators
Well, now i have a new problem: I answered my own questions by doing trial and error... but the problem now, which i cant seem to figure out through trial and error... is this:
I want the axis to have to steal 2 documents, and both documents are able to be stolen (i have that much down). The problem is that when one of the documents is stolen it ends the round. I want the axis to have to steal both sets of documents before the round ends. I do have the level.targets_to_destroy = 2, and level.targets_destroyed ++ in my script (though i dont really understand the latter). Here is my script, if someone could take a look and let me know
I want the axis to have to steal 2 documents, and both documents are able to be stolen (i have that much down). The problem is that when one of the documents is stolen it ends the round. I want the axis to have to steal both sets of documents before the round ends. I do have the level.targets_to_destroy = 2, and level.targets_destroyed ++ in my script (though i dont really understand the latter). Here is my script, if someone could take a look and let me know
Code: Select all
setcvar "g_obj_alliedtext1" "Protect Paladin"
setcvar "g_obj_alliedtext2" "and documents"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Assasinate Paladin"
setcvar "g_obj_axistext2" "and steal documents"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/69thHotel.scr
exec global/ambient.scr
level waittill spawn
level.dmrespawning = 0
level.dmroundlimit = 5
level.clockside = allies
level.targets_to_destroy = 2
// level waittill roundstart
$documents2_trigger thread document_check
$documents_trigger thread document_check
level waittill allieswin
end
document_check:
while(1)
{
self waittill trigger
if (parm.other.dmteam == axis)
{
self.target hide
level.targets_destroyed ++
break
}
waitframe
}
teamwin axis
end
Here is a script that might help you. It's part of a random obj mod. One of them has three documents to steal in order to win.
You can find the complete mod here:
http://www.mods-r-us.net/page.php?id=280
You can find the complete mod here:
http://www.mods-r-us.net/page.php?id=280
Code: Select all
win_setup:
level.num_docs_to_steal = 3 //obviously the 3 docs you have to rob
level.docs_in_possession = 0 //and what you ve robbed (nuthin )
objective1:
$allies1_trigger waittill trigger
if (parm.other.dmteam == allies)//chose the team
{
$docs1 hide
$allies1_trigger remove
wait 0.1
$player playsound pickup_papers2
$player playsound dfr_m1l2_132m_2
level.docs_in_possession++ //That will add 1 point
iprintln "Allies have stolen the Stg44 plans!"
}
thread win_status //check the 3docs has been stealed
end
objective2:
$allies2_trigger waittill trigger
if (parm.other.dmteam == allies)//chose the team
{
$docs2 hide
$allies2_trigger remove
wait 0.1
$player playsound pickup_papers2
$player playsound dfr_m1l2_132m_2
level.docs_in_possession++ //That will add 1 point
iprintln "Allies have stolen the Naxos plans!"
}
thread win_status //check the 3docs has been stealed
end
objective3:
$allies3_trigger waittill trigger
if (parm.other.dmteam == allies)//chose the team
{
$docs3 hide
$allies3_trigger remove
wait 0.1
$player playsound pickup_papers2
$player playsound dfr_m1l2_132m_2
level.docs_in_possession++ //That will add 1 point
iprintln "Allies have stolen the level2 papers!"
}
thread win_status //check the 3docs has been stealed
end
win_status:
if (level.num_docs_to_steal == level.docs_in_possession)
{
teamwin allies
}
end
