Home   Help Search Login Register  

Author Topic: Calling chopperspin script if damage = 0.8 or more  (Read 1504 times)

0 Members and 1 Guest are viewing this topic.

Marsuitor

  • Guest
Calling chopperspin script if damage = 0.8 or more
« on: 17 Sep 2002, 19:11:38 »
I'm making a mission where i intend to use the rotorfailure script.
The idea is to apply a script to a chopper through the init line, so that if damage of chopper = 0.8-1.0 then call and execute the chopperspin script.
A setdammage to something lower than 1 or 0.9 might also be needed before calling the spin script...

Could anyone give any pointers/assistance, please?

Cheers!

b0b

  • Guest
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #1 on: 17 Sep 2002, 20:43:48 »
U could just try to add a simple loop to the beggining of the tail rotor script, but it may me to complicated i havent seen the script.  If u can add a loop u could put something like this(havent tryed this so may be wrong)

#damage
?(heli dammage >= 0.8) goto "tail rotor scrit"
~0.1
goto "damage"


Marsuitor

  • Guest
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #2 on: 17 Sep 2002, 21:15:50 »
Ok, this snippet, would it be possible to let that be a standalone .sqs and use it for the init line of the chopper?

Also, the rotor script i'm using is the one available from the depot here in Ofpec.

Cheers!

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #3 on: 18 Sep 2002, 03:57:11 »
you can use this instead of looping a script

@heli getdammage >= 0.8
;rest of the script goes here


You can use that as a condition of the trigger that executes your tailroter script or insert it as the first line of the script.

Marsuitor

  • Guest
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #4 on: 18 Sep 2002, 11:03:42 »
Hmmm,
i'm getting that "getdammage" is an invalid operator if i apply it as a condition for a trigger or at the start of the tailrotor script itself.
My guess is it's me who's quite incompetent in this department, so i'll just attach the script and if anyone could take a look and add necassary code i'd really appreciate it!  :)

Cheers!

Gameer_77

  • Guest
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #5 on: 18 Sep 2002, 18:31:02 »
I think Black_Feather means:

@ getdammage heli >= 0.8

 ::)

 8)PEACE

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #6 on: 18 Sep 2002, 22:33:50 »
 :-[ yes I do, and leave out the @ if you put it as a condition in a trigger.

Marsuitor

  • Guest
Re:Calling chopperspin script if damage = 0.8 or more
« Reply #7 on: 19 Sep 2002, 03:45:33 »
It worked!
Thanks alot guys!  :)

---Solving topic---