Objective scripting

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Objective scripting

Post by solar »

I have three objectives in my map and I'm wondering if there is a way to script it so that the win condition occurs when any two of the three are completed. Any suggestions?
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

No problem. Just add to a variable each time an objective is completed, and then make the win - condition that that variable has reached 2 ( instead of 3 for all objectives ).

If you are using bombs as objectives, you are using the level.targets_to_destroy variable used by the global/obj_dm.scr::bomb_thinker. Just set it to level.targets_to_destroy = 2 instead of 3...

Hope I expain on your level, if not: ask a again....
Admin .MAP Forums
Image
Head above heels.
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Post by solar »

Thx Bjarne, try it out when I get home, however, I have two bomb objs and one of your doc objs. Change anything???
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Well, just follow the tutorial on combining bombs and documentsI've got...
Admin .MAP Forums
Image
Head above heels.
Post Reply