objective assasination script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

objective assasination script

Post by snajperu »

My script looks exactly this:

//Warsaw Rising '44
//Architecture: snajperu
//Scripting: snajperu

main:
exec global/ai.scr

level waittill prespawn
level waittill spawn
fadein 2 0 0 0 1
wait 2
thread objectives
end

/////////////OBJECTIVES
objectives:
waitthread global/objectives.scr::add objectives 1 2 "Kill the officer with captured weapon."
$obj1.origin

set_objective_pos $officer
thread objective1
end

//////////
objective1:
waitthread global/objectives.scr::current_objectives 1
if (IsAlive $officer)
$officer waittill death
thread mission_complete
end

//////////
mission_complete:
waitthread global/objectives.scr::add objectives 1 3 "Kill the officer with captured weapon."
$obj1.origin
waitthread global/objectives.scr::current_objectives 0
iprintln_noloc "The officer has been killed. Mission complete!"
wait 1
exec global/missioncomplete.scr test_bfw1944 1
end

Is there any error? Plx help
I think is all ok but...does not work
placed in d:/medal of honor/main/maps
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

D/program files/ea games/mohaa/main/maps/obj
is the objective directory :wink:
Image
User avatar
LeadHead
Sergeant Major
Posts: 115
Joined: Sun Apr 04, 2004 8:13 pm
Location: New York
Contact:

Post by LeadHead »

Green Beret wrote:D/program files/ea games/mohaa/main/maps/obj
is the objective directory :wink:
I think he is making a single player map though, so it shouldn't be in the objective map directory, right?
Image
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Post by snajperu »

Yes, it is single player map
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

waitthread global/objectives.scr::add objectives 1 2 "Kill the officer with captured weapon."
$obj1.origin

should be on 1 line:

waitthread global/objectives.scr::add objectives 1 2 "Kill the officer with captured weapon." $obj1.origin

You have the same error a few lines more down.

Note that the console will always tell you why a script fails to run properly.
Image
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Post by snajperu »

Thank You :)
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Sorry, I just seen obj and thought he was making MP.
Because all single player is pretty much objective :oops:
Image
snipester
Banned
Posts: 135
Joined: Tue Apr 18, 2006 1:22 am

Post by snipester »

aight i know this is old couldnt sleep read random ones looked interesting. how can i get the code for assasinaion for mp maps. any SF or DV would be best! thanks
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.
Post Reply