OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ProudPotter2490 on 01 May 2005, 18:07:19

Title: Begin In Height!
Post by: ProudPotter2490 on 01 May 2005, 18:07:19
Hey everyone!
Does anyone know how to start a unit off at a specific height? For example, I have a paratrooper but I want him to start at 25 meters rather than the standard 50 (i think?) Can anyone help?
Thanks!
ProudPotter2490 :afro:
Title: Re:Begin In Height!
Post by: THobson on 01 May 2005, 18:27:38
In the unit's init field try putting:

this setPos [getPos this select 0,getPos this select 1,(getPos this select 2) + 25]
Title: Re:Begin In Height!
Post by: ProudPotter2490 on 01 May 2005, 18:32:28
Hey.
Sorry THobson it doesn't work. Instead the unit falls without the parachute which is amusing but not what i'm looking for ;).
ProudPotter2490.
Title: Re:Begin In Height!
Post by: 456820 on 01 May 2005, 18:44:34
this is fixed by changing the soldier into a prachute by edit the unit and i think its under air look for parachute then use what thobson said and he should use his parachute
Title: Re:Begin In Height!
Post by: ProudPotter2490 on 01 May 2005, 18:54:10
Hey!
Lol thats what I did do buddy but he still falls onto his ass and dies :). Any other suggestions anyone?
ProudPotter2490 :afro:
Title: Re:Begin In Height!
Post by: XCess on 01 May 2005, 19:21:35
Create an empty parachute (name: para).. i think they're in there... in the init field type:

this setPos [(getPos man select 0),(getPos man select 1),(getPos man select 2)+25]

then create a soldier (named man) and in his init:

this moveInDriver para.

If you can find a parachute in the editor use the following in an init.sqs:

para = "parachute" camCreate [0,0,1000]


Oh.. an Thobson, I'll be back on the Beta forum as soon as the damned disc arrives.  >:(
Title: Re:Begin In Height!
Post by: ProudPotter2490 on 01 May 2005, 19:36:05
Hey!
Thanks XCess but this doesn't work either. It says this error: "Error Reserved Variable In Expression". I did everything you said. Thanks anyway matey!
ProudPotter2490 :afro:
Title: Re:Begin In Height!
Post by: Planck on 01 May 2005, 20:14:10
The class names for the parachutes are:

"ParachuteEast"
"ParachuteWest"
"ParachuteC"
"ParachuteG"

Try one of those.

EDIT: In more detail......

pch = "ParachuteWest" createVehicle [0,0,1000]
pch setpos [getpos loon select 0, getpos loon select 1, 25]
loon moveInDriver pch

btw......the loon will not survive at 25 metres, you will need a minimum of 40 I think.


Planck
Title: Re:Begin In Height!
Post by: ProudPotter2490 on 01 May 2005, 22:13:23
Hey!
Cheers boys! I'm good to go :)!
ProudPotter2490 :afro: