Home   Help Search Login Register  

Author Topic: Spawn flying aircraft  (Read 909 times)

0 Members and 1 Guest are viewing this topic.

McHale

  • Guest
Spawn flying aircraft
« on: 30 Sep 2003, 00:06:43 »
Anyone know how can I spawn a chopper / A10 etc during a mission(by script), so that the craft is actually flying, and not just  sitting the ground?

I tried setting the hieght to 1000 or whatever, but the choppers dont have enough time to get their rotas spinning, and they fall to the ground.  ::)
« Last Edit: 30 Sep 2003, 00:10:28 by McHale »

Kaliyuga

  • Guest
Re:Spawn flying aircraft
« Reply #1 on: 30 Sep 2003, 00:11:30 »
 Not sure if it would work .. but you could give it a little push with setvelocity while it's waitin for those blades to start spinnin..

 It would be good for a few laughs if nothing else I guarantee you that ;D

 
  of course there may be a perfectly reasonable/sane  answer  to this question as well  ;)

:cheers:

Gillett

  • Guest
Re:Spawn flying aircraft
« Reply #2 on: 30 Sep 2003, 02:31:06 »
If you go to the 'Advanced' section of the Editor, when you place an object it gives you an a option called 'Flying' something. Anyway, if you give a Helicopter the flying thing, it makes it start in the air, with rotors already spinning...

McHale

  • Guest
Re:Spawn flying aircraft
« Reply #3 on: 30 Sep 2003, 02:35:45 »
Thats not exactly what I meant.

I am spawning the aircraft(and pilots) with a script, not with the editor. I need to know how to get them to spawn in the air and flying...

(I already tried giving them a start velocity. With humerous(but equally as useless) reults.)
« Last Edit: 30 Sep 2003, 02:38:29 by McHale »

m21man

  • Guest
Re:Spawn flying aircraft
« Reply #4 on: 30 Sep 2003, 03:20:31 »
Just spawn 'em 1000 meters up. That's good for laughs ;D !

Kaliyuga

  • Guest
Re:Spawn flying aircraft
« Reply #5 on: 30 Sep 2003, 18:39:17 »
 Nice thought M21  ..... but...  

I tried setting the hieght to 1000 or whatever, but the choppers dont have enough time to get their rotas spinning, and they fall to the ground.  ::)

Gillett

  • Guest
Re:Spawn flying aircraft
« Reply #6 on: 01 Oct 2003, 08:15:27 »
Thats not exactly what I meant.

I am spawning the aircraft(and pilots) with a script, not with the editor. I need to know how to get them to spawn in the air and flying...

(I already tried giving them a start velocity. With humerous(but equally as useless) reults.)

What do you mean 'with script' ? You mean there is some other way to edit maps besides with the Mission Editor?
« Last Edit: 01 Oct 2003, 08:16:15 by Gillett »

-Omega-

  • Guest
Re:Spawn flying aircraft
« Reply #7 on: 01 Oct 2003, 09:30:12 »
Quote
What do you mean 'with script' ? You mean there is some other way to edit maps besides with the Mission Editor?


It's called Scripting. It's a lot more technical and detailed than the basic editor, but there's many, many guides and tutorials on how to do it. If you're interested in learning ways to make better missions and have a good understanding of the editor, I'd strongly recommend Johan Gustaffson's Scripting Tutorial. Look in the editing center's tutorial section...

damaxta

  • Guest
Re:Spawn flying aircraft
« Reply #8 on: 01 Oct 2003, 17:55:16 »
helicopter flyInHeight height
Operand types:
    helicopter: Object
    height: Number
Type of returned value:
    Nothing
Description:
    Set flying height level for helicopter. Accepter range is 50 to 1000.

Example:
    cobraOne flyInHeight 150

Above is excerp from script guide. I think you have to use the  "flyinheight" to set the helicopter with engine on etc.

haven't tried yet though!
regards

the_THING

  • Guest
Re:Spawn flying aircraft
« Reply #9 on: 25 Oct 2003, 07:29:03 »

try looking at this code i wrote:
holds vehicle in position while engines start up, then releases.

exec it passing on the object name and positon
----------------------------------------------------------

_obj=_this select 0
_pos=_this select 1

_vehtype= "air" countType [_obj]
?(vehtype==0):goto "exit"
_alt=_pos select 2
?(_alt<2):goto "exit"
_obj action ["engine on"]
#loop

_obj setpos [_pos select 0,_pos select 1,_pos select 2]

_spee=fuel _obj
?(_spee < .9993):goto "exit"
?(damage _obj==1):goto "exit"
goto "loop"


#exit
hint "bye"
exit

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Spawn flying aircraft
« Reply #10 on: 25 Oct 2003, 13:30:38 »
Hi

FWIW - I have been working on spawning scripts and tried out your little problem.  After much effort I managed to spawn a BMP, but I discovered from the Command Ref that the vehicle must appear empty.  Maybe your helo keeps dying because there is no one in it !   :o

I think that the answer is to create a helo AND the crew (loaded to the helo), but that sounds like too much work for mee to work out  :P

Good Luck !



Roni

cpt.Hawkeyez

  • Guest
Re:Spawn flying aircraft
« Reply #11 on: 26 Oct 2003, 19:50:52 »
People People people you're strainingyou're mind Just create a Vehicle inside the edito somewhere off the map far away, then when you need it, just use the Setpos command to bring it near wherever you are. Thats the easiest way to do it.

/CymPaTheeY

McHale

  • Guest
Re:Spawn flying aircraft
« Reply #12 on: 27 Oct 2003, 02:28:50 »
Thank you, Thing.

That's more or less exactly what I did to spawn em flying.