OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Commando on 19 Mar 2005, 01:09:32

Title: extration troubles
Post by: Commando on 19 Mar 2005, 01:09:32
I got a blackhawk that flies to a location and picks up a squad of players and a.i..
and the thing is sometimes when the LZ gets hot and bullets and a rocket or two makes some fly byes and hit the blackhawk wich doesn't always get destroyed, it sometimes flips over up side down or it gets little dammaged and the pilots have even jumped out...
so the squad of players and a.i loons + the pilots gets stuck firing back and just not getting anywhere with the blackhawk because the pilots have jumped out and are standing next to it taking a coffé break or something  :P

what can i do to get rid of that bug?
observe it doesn't always occure just sometimes   :-X
there is a secondary extraction route off the island but it only gets activated when the chopper gets destroyed, but if i destroy chopper .. some stupid a.i loons standing to close get killed and they all kill me  ::)

so is there anyway to make the chopper blow up when its turned up side down or the pilots have jumped out? yeah prefarably with a 15 sec. timer so that players that are inside the cargo have a chance to get away before the chopper selfdestructs?  ;D
Title: Re:extration troubles
Post by: dmakatra on 19 Mar 2005, 01:13:46
Syntax not guaranteed

if (driver chopper == objnull) && (gunner chopper == objnull) : chopper setdammage 1

:beat: *Gets Shot* :beat:
Title: Re:extration troubles
Post by: Pilot on 19 Mar 2005, 01:18:34
Can't you just use a canmove command?

!canmove heli
or
not canmove heli
Title: Re:extration troubles
Post by: The-Architect on 19 Mar 2005, 03:42:30
Use Vektorboson's Tail Rotor Failure script. You could call it from another script which you could run once you got into the chopper. Have a random chance of calling the Tail Rotor Failure script from the first script.
I'll give you an example if you want. I'll have to check my other computer first.

Here's the link to the script.
http://www.ofpec.com/editors/resource_view.php?id=328
Title: Re:extration troubles
Post by: Pr0ph3t on 19 Mar 2005, 04:24:43
Also note:
If you want to make a bigger explosion:

this setdammage 1; this setdammage 0; this setdammage 1; (etc)

Title: Re:extration troubles
Post by: Commando on 19 Mar 2005, 11:37:19
thx for replies guys, wil try your ways and post if it worked  :)
Title: Re:extration troubles
Post by: Commando on 19 Mar 2005, 11:46:07
btw dmakatra where do i type your stuff in? in a script or in the activation line of a trigge ror a initfield?
i tried putting the stuff in a trigger but got errors about bool and && something  :P
Title: Re:extration troubles
Post by: dmakatra on 19 Mar 2005, 11:48:44
in a script, but you can do it in a trigger to:

cond: (driver chopper == objnull) && (gunner chopper == objnull)
on act: chopper setdammage 1

:beat: *Gets Shot* :beat:

EDIT: Hey, he spelled my name right! Hoo-ah! ;D
Title: Re:extration troubles
Post by: Commando on 19 Mar 2005, 12:04:24
ohh like that  :D i'll try again  ;)
well this time no error messages, will see if it works later when i'll play the mission with some friends in lan.