Home   Help Search Login Register  

Author Topic: planes moving backwards script?  (Read 775 times)

0 Members and 1 Guest are viewing this topic.

Anthrid

  • Guest
planes moving backwards script?
« on: 26 Feb 2004, 05:18:58 »
Hey guys, just wondering if it is possible. I wanna move the planes, such as f-18, and a-10 into hangars and stuff. Is it possible?

Offline Kuro

  • Former Staff
  • ****
  • 2./FschJgBtl 251 Green Devils
    • VBS2 Mission Download Site
Re:planes moving backwards script?
« Reply #1 on: 26 Feb 2004, 06:27:25 »
Well, i do not think you can really move them backwards, but if you make a loop with "setPos" it is possible to make them appear moving backwards. At least if you are not so near.

DBR_ONIX

  • Guest
Re:planes moving backwards script?
« Reply #2 on: 26 Feb 2004, 18:33:53 »
Use this setveocity [?,?,?]
You need a bit of code to work out what values it backwards.. I don't know what it is..
But it can be done fairly easily :)
One other thing.. why!!
:)
- Ben

Dubieman

  • Guest
Re:planes moving backwards script?
« Reply #3 on: 27 Feb 2004, 21:45:13 »
Why??? Why you say.

Ever try getting your little plane or jet off a tree or get stuck in the middle of a few buildings? The plane is unusable. Its like a car in the city that doesn't have a reverse... :o

setpos or setvelocity would work.

DBR_ONIX

  • Guest
Re:planes moving backwards script?
« Reply #4 on: 02 Mar 2004, 18:19:27 »
Woops.. Read the post a bit better.. Yeah.. I see why :)

Code: [Select]
_speed = 10
_guy = _this select 0
_dir = (direction _guy)

_speedx = velocity _guy select 0
_speedy = velocity _guy select 1
_speedx = _speedx - _speed
_speedy = _speedy - _speed
_fastz = velocity _guy select 2
_fasty = _speedx*cos _dir
_fastx = _speedy*sin _dir

_guy setvelocity [_fastx, _fasty, 0]


; Stops the player repeatly useing the reverse button
;(By removing it, and adding it again after 5 seconds)
_guy removeaction revacc
~ 5
revacc = [this] addaction ["Reverse","reverse.sqs"]

That code should be a good starting point (I have no idea if it works.. It should, I modified it of my jumping script).. Change the speed bit at the top..

Then use
Code: [Select]
revacc = [this] addaction ["Reverse","reverse.sqs"]


This should be okay...
If not... ::)
:P
- Ben

Anthrid

  • Guest
Re:planes moving backwards script?
« Reply #5 on: 14 Mar 2004, 05:33:26 »
Ok, this action only appears once, what do i add to keep repeating it?

EDIT: ok, i figured it out, there was a mitake in code here...One question...can you gradually gain to the maximum reverse speed? Also, is it possible to keep going backwards until YOU yourself decide not to? PLease show :-)

I also noticed that when you are pretty close to the plane, the option pops up :-(   How do i eliminate it?
« Last Edit: 14 Mar 2004, 06:11:09 by -=Anthrid=- »