Home   Help Search Login Register  

Author Topic: C130 Rolling Deployment  (Read 3261 times)

0 Members and 1 Guest are viewing this topic.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
C130 Rolling Deployment
« on: 24 Oct 2005, 01:15:17 »
Is it possible to force a C130 to land in a flat open space (not runway) and keep a steady, slow speed (around 10mph) before taking off again? Would it also be possible to have units dropped off or created as they passed?



Thanks, Dan.  :)
« Last Edit: 24 Oct 2005, 01:19:06 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:C130 Rolling Deployment
« Reply #1 on: 24 Oct 2005, 05:38:06 »
you can use flyin height 1 to make them do that but they will crash if theres a tree or hill,

you could probably drop a tank or somthing, but infantry would die.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #2 on: 24 Oct 2005, 13:08:24 »
Thanks, I'll try it out.  :)

Ok, that worked, but is there a way of forcing a plane to slow down without using setvelocity which looks bad?
« Last Edit: 24 Oct 2005, 13:16:54 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Homefry31464

  • Guest
Re:C130 Rolling Deployment
« Reply #3 on: 24 Oct 2005, 16:44:23 »
No.  A slow setvelocity look is about the only way.  A slow setpos loop would work as well I suppose... but I don't know if you'd achieve the desired effect that way.  Either way getting planes to land on anything not defined as a runway would be tough.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #4 on: 24 Oct 2005, 19:04:25 »
Hmm, thats a shame, I thought there might be a less dramatic version like the way flyInHeight works. I'm, gonna keep trying some different ideas, any suggestions are very welcome.

Just one other quick question, how do I force Hawk's C130 to deploy it's gear? Cheers, Dan.  :)
« Last Edit: 24 Oct 2005, 19:20:55 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Dane

  • Guest
Re:C130 Rolling Deployment
« Reply #5 on: 25 Oct 2005, 11:09:50 »
[nameOfPlane] exec "\HWK_c130\script\geardown.sqs"

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #6 on: 25 Oct 2005, 19:01:59 »
Thanks.  :)
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Pilot

  • Contributing Member
  • **
Re:C130 Rolling Deployment
« Reply #7 on: 25 Oct 2005, 19:33:30 »
Setvelocity should work fine, just do something like this:

_plane=_this select 0

#Loop
~.1
_vel = getvelocity _plane
?planeDone: exit
?_vel<=100: goto "Loop"
_plane setvelocity (_vel*.9)
~.9
goto "Loop"

Simply set planeDone=true when you want the script to stop.

The script will slow the plane down gradually, it won't immediately set it to a certain velocity.  Play around with the .9 value to get what you want, you may also want to adjust the delays a bit.

Not tested, so I don't know if it works.

-Pilot

EDIT:
You can also change the speed (100 in the script) to whatever speed you want
« Last Edit: 25 Oct 2005, 19:34:52 by Pilot »

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #8 on: 25 Oct 2005, 20:45:04 »
Ah, thanks a lot Pilot! That's exactly what I meant, I'm gonna try this out now.  :D
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re:C130 Rolling Deployment
« Reply #9 on: 25 Oct 2005, 22:35:47 »
Hm. There is no getvelocity command and setvelocity works with an [x,y,z] array to define the direction of the created velocity.

_plane=_this select 0

#Loop
~.1
_vel = (speed _plane)*1000/3600
?planeDone: exit
?_vel<=100: goto "Loop"
_plane setvelocity [(_vel*.9),0,0]
~.9
goto "Loop"


Replaced getvelocity with speed. Speed is km/h, velocity m/s...

In this example the plane has to fly from W to E. To make the heading unimportant you will have to include getdir and trigometry calculations for perfect setvelocity values.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #10 on: 25 Oct 2005, 23:17:35 »
EDIT: Do you guys know how I can fix this error?

'herc|#|=_select 0': Error Reserved variable in expression

At the moment, the C130 just stops in mid air and falls to the floor not so smoothly, no matter what else I tweak.  ???
« Last Edit: 25 Oct 2005, 23:38:59 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Pilot

  • Contributing Member
  • **
Re:C130 Rolling Deployment
« Reply #11 on: 26 Oct 2005, 01:48:30 »
Quote
There is no getvelocity command
*slaps head*

And on top of that setvelocity is an array format...now I really feel dumb...

However, there is a velocity command.  Try this:
_plane=_this select 0

#Loop
~.1
?planeDone: exit
?speed _plane<=10: goto "Loop"
_plane setvelocity [(velocity _plane select 0)*.9,(velocity _plane select 1)*.9,(velocity _plane select 2)*.9]
~.9
goto "Loop"

Call the script in the init field of the plane like this:
[this] exec "script.sqs"

Trapper's script might work too, but it seemed a bit over-complicated to me...I don't mean any offense, Trapper :-[

Once again, this isn't tested ::)

-Pilot

EDIT:
Btw, do not change the _plane=_this select 0 part.  When you call the script like I showed you, the plane's id is automatically entered into the script, there is no need to actually put the plane's name in the script.

...I hope that's understandable... ::)
« Last Edit: 26 Oct 2005, 01:51:09 by Pilot »

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re:C130 Rolling Deployment
« Reply #12 on: 26 Oct 2005, 08:29:58 »
*slaps head*

And on top of that setvelocity is an array format...now I really feel dumb...

However, there is a velocity command.
Now I know exactly how you felt.  ;)
Yes, velocity is much better for the script.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re:C130 Rolling Deployment
« Reply #13 on: 26 Oct 2005, 15:20:59 »
That works perfectly Pilot, thanks!  ;D

Ok, it works well if I pilot the plane and put the gear down, but the AI don't do that, and the "Gear Down" script doesn't override the "Gear Up" script that initialises with the plane.

What to I type to make the AI use the "Gear Down" action in the action menu?
« Last Edit: 26 Oct 2005, 15:42:50 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Pilot

  • Contributing Member
  • **
Re:C130 Rolling Deployment
« Reply #14 on: 26 Oct 2005, 16:00:30 »
Maybe try waiting about 10 seconds before you put the gear down?  I don't really know, though...the AI might automatically put the gear back up again.

The only other alternative I know would be to have a looped script that constantly puts the gear down.  If the delay is just right, the gear won't go back up.  Something like this:
_plane = _this select 0

#Loop
?planeDone: exit
[_plane] exec "\HWK_c130\script\geardown.sqs"
~.2
goto "Loop"

Quote
Now I know exactly how you felt.  ;)
Lol, what a terrible feeling, huh? :P

-Pilot