OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: blekzebbed on 11 Jun 2006, 13:01:11

Title: Parachute
Post by: blekzebbed on 11 Jun 2006, 13:01:11
Hi, here's a little noobish question from me:
If I make a unit like this:
_s = "SoldierEB" createUnit [getMarkerPos "respawn", d]
And I let it create in the air, how can I put this guy into a parachtue?
thanks
Title: Re: Parachute
Post by: Cheetah on 11 Jun 2006, 14:17:14
I think that your best try would be to create a unit that has a parachute. So that means that you have to replace SoldierEB with Parachute or the correct class for a man with a parachute.

You could use this page to try if you can find the suitable class.
http://www.ofpec.com/COMREF/vehicles.html
Title: Re: Parachute
Post by: myke13021 on 11 Jun 2006, 15:50:31
hmmm...maybe first creating a empty chute, then creating the unit, moveindriver unit into chute and the setpos the whole thing to it's definitive place might work.
Title: Re: Parachute
Post by: Blacknite on 11 Jun 2006, 18:36:28
What I discovered is that if you create an EMPTY parachute and set it to "FLYING".

Then the unit you want to have a parachute, put this in the init:
this moveindriver parachute's name

Example:
I created an empty parachute and named it para1, I set it to "FLYING".
I want Bob to be in para1, so I put this in his init:
this moveindriver para1
or
Bob moveindriver para1


You can also control the starting height of the parachute aswell, with the following in its init field:
this setpos [(GetPos this select 0),(GetPos this select 1),height]
height being anynumber you want.

Title: Re: Parachute
Post by: blekzebbed on 11 Jun 2006, 21:18:17
Okay, thanks guys:D