Home   Help Search Login Register  

Author Topic: Animation script ~~~> HELP!!!!  (Read 518 times)

0 Members and 1 Guest are viewing this topic.

SH@dow 113

  • Guest
Animation script ~~~> HELP!!!!
« on: 30 Jun 2004, 18:00:17 »
I'm trying to make an animation script for the dropship of the SST mod, but this script is for my mission (maybe publicated later ;)). I want to make it that when the ship (same as a chopper) goes under a certain height it will automaticly lower its landing gear, open the doors, etc. etc. etc. And when it gets above a certain heigt it raises the gear and close the doors, etc. etc. You c, but I don't got so many scripting skills.
Do I use
Quote
?_dropship FlyInHeight > 20
or somthing?

Thx in advance :cheers:

Heres a copie of what I made so far.
Quote
; ******************************************************************************
; ** This is a script for the Dropship of SST mod.
; ** Name your Dropship dropship and put this in its Init:
; ** [dropship] exec animation.sqs
; ******************************************************************************

; Parameters
_unitname = _this select 0

; Gear up
?_dropship FlyInHeight > 20
dropship animate ["thegear", 1]   

; Gear down
?_dropship FlyInHeight < 20
dropship animate ["thegear", 0]   

; Open Ramp
dropship animate ["backramp", 1]   

; Close Ramp
dropship animate ["backramp", 0]   

; Thuster 1 Back
dropship animate ["thegear1", 1]   

; Thuster 2 Back
dropship animate ["thegear2", 1]
   
; Thuster 1 Forward
dropship animate ["thegear1", 0]
   
; Thuster 2 Forward
dropship animate ["thegear2", 0]

Offline Blanco

  • Former Staff
  • ****
Re:Animation script ~~~> HELP!!!!
« Reply #1 on: 30 Jun 2004, 18:32:20 »
Do this :
Code: [Select]
_dropship = _this select 0

#checkH
? (getpos _dropship select 2 <= 20) : goto "geardown"
? (getpos _dropship select 2 >= 20) : goto "gearup"
~2
? alive _dropship : goto "checkH"


#geardown
_dropship animate ["thegear", 0]
...And so on...

@(getpos _dropship select 2 > 20)
goto "checkH"


#gearup
_dropship animate ["thegear", 1]
...And so on..

@(getpos _dropship select 2 < 20)
goto "checkH"



« Last Edit: 30 Jun 2004, 18:35:23 by Blanco »
Search or search or search before you ask.

SH@dow 113

  • Guest
Re:Animation script ~~~> HELP!!!!
« Reply #2 on: 30 Jun 2004, 18:42:49 »
Thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you

Cheers m8 :cheers:

I rlly ow u 1 if u need anything, ask :)

SH@dow 113

  • Guest
Re:Animation script ~~~> HELP!!!!
« Reply #3 on: 30 Jun 2004, 19:07:03 »
I'm having a problem, the ship is hanging above 20m whit the doors open and gear down etc. etc. This is what I made from the script.
Quote
; ******************************************************************************
; ** This is a script for the Dropship of SST mod.
; ** Name your Dropship dropship and put this in its Init:
; ** [dropship] exec animation.sqs
; ******************************************************************************

_dropship = _this select 0

#checkH
? (getpos _dropship select 2 <= 20) : goto "geardown"
? (getpos _dropship select 2 <= 20) : goto "openramp"
? (getpos _dropship select 2 <= 20) : goto "truster1forward"
? (getpos _dropship select 2 <= 20) : goto "truster2forward"
? (getpos _dropship select 2 >= 20) : goto "gearup"
? (getpos _dropship select 2 >= 20) : goto "closeramp"
? (getpos _dropship select 2 >= 20) : goto "truster1back"
? (getpos _dropship select 2 >= 20) : goto "truster2back"
~2
? alive _dropship : goto "checkH"


#geardown
_dropship animate ["thegear", 0]
#openramp
_dropship animate ["backramp", 1]
#truster1forward
_dropship animate ["thegear1", 0]
#truster2forward
_dropship animate ["thegear2", 0]

@(getpos _dropship select 2 > 20)
goto "checkH"


#gearup
_dropship animate ["thegear", 1]
#closeramp
_dropship animate ["backramp", 0]
#truster1back
_dropship animate ["thegear1", 1]
#truster2back
_dropship animate ["thegear2", 1]

@(getpos _dropship select 2 < 20)
goto "checkH"