Stealing Papers OBJ
Moderator: Moderators
Stealing Papers OBJ
I am using the tutorial on this page : http://map.moh-central.net/t.php?id=31
I have done the two map edits and compiled the map and copied and pasted the code into a new scr for testing and all it does is loop the allies win, so basically i don't get to do the obj can anyone help me please.
I need this to work before i can add any more objectives
I have done the two map edits and compiled the map and copied and pasted the code into a new scr for testing and all it does is loop the allies win, so basically i don't get to do the obj can anyone help me please.
I need this to work before i can add any more objectives
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Code: Select all
// Custom objective test map
// ARCHITECTURE: Bjarne Gr?nnevik
// SCRIPTING: Bjarne Gr?nnevik
main:
setcvar "g_obj_alliedtext1" "Steal the documents."
setcvar "g_obj_alliedtext2" "- Go get them"
setcvar "g_obj_alliedtext3" "- U know U what to"
setcvar "g_obj_axistext1" "Prevent the allies"
setcvar "g_obj_axistext2" "from stealing the"
setcvar "g_obj_axistext3" "documents (Please?)."
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/mp_farm_house_obj.scr // Change to the name of you'r map file
exec global/ambient.scr
level waittill spawn:
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
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
One error is this:
...it should be:
Try correcting that first.
Code: Select all
level waittill spawn:Code: Select all
level waittill spawn-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Oh, crap. Spotted it.
The script should be like this:
...the line:
...has ended up after the comment on the line before, ad is therefore never executed 
The script should be like this:
Code: Select all
// Custom objective test map
// ARCHITECTURE: Bjarne Gr?nnevik
// SCRIPTING: Bjarne Gr?nnevik
main:
setcvar "g_obj_alliedtext1" "Steal the documents."
setcvar "g_obj_alliedtext2" "- Go get them"
setcvar "g_obj_alliedtext3" "- U know U what to"
setcvar "g_obj_axistext1" "Prevent the allies"
setcvar "g_obj_axistext2" "from stealing the"
setcvar "g_obj_axistext3" "documents (Please?)."
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/DMprecache.scr
// Change to the name of you'r map file
level.script = maps/obj/mp_farm_house_obj.scr
exec global/ambient.scr
level waittill spawn:
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
// Start the win check thread for allies
thread desk_document_check
// If the end of the match is reached, the Axis win
level waittill axiswin
end // end of main
// Document checks
desk_document_check:
while(1)
{ // As long as 1 equals 1 ( that would be forever )
// Dont execute past this line until
// someone triggers the object
$documents_trigger waittill trigger
if (parm.other.dmteam == allies)
{
// parm.other is the triggerer ( testing here to
ensure only allies can complete the ojective )
// Make the document graphix disappear
$documents hide
break // break out of the while loop
}
// protection against making this thread use too much CPU
waitframe
}
// Make allies win the match
teamwin allies
end // end allies victory testCode: Select all
$documents_trigger waittill trigger -
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
In your script, the text:
...is not on a separate line.
It should be, but it was wrong in the tutorial, and I have updated it now.
Look at this original version of the same tutorial instead, it does not have the error: http://gronnevik.se/rjukan/index.php?n= ... ctiveTheft
Code: Select all
$documents_trigger waittill triggerIt should be, but it was wrong in the tutorial, and I have updated it now.
Look at this original version of the same tutorial instead, it does not have the error: http://gronnevik.se/rjukan/index.php?n= ... ctiveTheft
Cheers Bjarne BZR,
That worked perfectly, do you have any other tuts for taking the docs to a radio to extend that objective or something similar.
Thanks for what u done works great now.
If anyone knows why when i blow up a door, door being an object stops people walking through the door way, sort of a hidden door there after being Blown up.
That worked perfectly, do you have any other tuts for taking the docs to a radio to extend that objective or something similar.
Thanks for what u done works great now.
If anyone knows why when i blow up a door, door being an object stops people walking through the door way, sort of a hidden door there after being Blown up.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Got some tuts on combining objective types on my site: http://gronnevik.se/rjukan/spy0012 wrote:That worked perfectly, do you have any other tuts for taking the docs to a radio to extend that objective or something similar.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
