OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: AshkenaZ on 23 May 2005, 22:14:52

Title: Dissarm missile..
Post by: AshkenaZ on 23 May 2005, 22:14:52
I am making a mission, where one of the objectives, is to dissarm some nukes.
I made the Addaction function to call the script..

Even made it, with different options (wich wire to cut. blue, red, yellow)
But now i need a command, in the script, that would keep the missile alive.

Even when another nuke is detonated..!

How to do ???

Plz help!

Title: Re:Dissarm missile..
Post by: bedges on 23 May 2005, 22:32:10
more info is required i think - do you mean you need to prevent the nuke from being accidentally detroyed? if so, a looped script, setting the damage to 0 every second or so would suffice. dunno - the question isn't clear  :-\
Title: Re:Dissarm missile..
Post by: AshkenaZ on 24 May 2005, 06:14:56
im sorry..

yes Its to prevent the missile to be destroyed..
I tried the  setdamage command.

and it Did`nt work  :(

i have to dissarm 3 nukes, in my mission.
If i dissarm them, then it should call a scipt, that should make them unbreakeble..



Title: Re:Dissarm missile..
Post by: bedges on 24 May 2005, 10:39:36
m'kay, well that should be easy enough - the script you call after each is disarmed should be something like this:

Code: [Select]
;indestructible

?stop_indestruct:goto "end"

#loop
nuke_name setdamage 0.0
~0.1
?not (stop_indestruct):goto "loop"

#end
exit

in your init file you should initialize the 'stop_indestruct' variable by setting it to false. this means that once you call the script, it will continue looping until you make 'stop_indestruct' true.

unless a bomb goes off right next to the nukes which blows them up in one go, they should be okay :)
Title: Re:Dissarm missile..
Post by: AshkenaZ on 24 May 2005, 11:40:11
Thx, for your help..

It worked...  ;D