OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Sol Fire on 04 Feb 2004, 17:12:14
-
i knew this a while back but lost lots of stuff from my computer after i had to reformat, so here goes...
how would i go about making a script watch certain objects health, and as soon as its shown as blown up set the objective to done
i know how to set the objective to done already but making the script watch the object's health has totally slipped my mine.. er... mind :P
-
Hi.
In a trigger:
Condition: not alive ObjectName
Activation: "west_1" objStatus "done"
-
Maybe this kind of script but don't copy it exactly it probably has errors. :-\
_object1 = _this select 0
#CheckHealth
;okay here you replace the values 0.5 with wat u want
?((GetDammage _object1) < 0.5) : goto #CheckHealth
?((GetDammage _object1) >0.5) : goto #Complete
;Here this should check off the objective
;beware the "this" thoughi think it ain't right
#Complete
this "1" objStatus "DONE"
exit
-
Sorry about this that script doesn't show you the current status of the object like it should show it on the screen like tank down to 50% damage.... :-[
Guess you gotta get one of the more expierenced ppl to help you or modify this script, not sure on multiple argument scripts.... :P
-
me neither lol
most i remember was i used getdammage to watch the building, if it goes below a certain health point it would setdammage 1 to make sure it blew and if i remembered my commands i would be able to do the rest but i used this some time in the summer of last year then i left OFP for a while and came back and used it again in the fall and havnt used it since
maybe someone will know, i'll try wild's and see if i can get it working that way also
-
Yeah wildbeests little reply works.
One thing though, the "west_1" objstatus "DONE" is for multiple briefings but i'm sure it works fine for Single player
missions.
Just use "1" objstatus "DONE" to make the briefing objective have a check on it. :)