OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman on 25 May 2005, 02:45:27

Title: EJECT AND THEN SETPOS ON GROUND
Post by: penguinman on 25 May 2005, 02:45:27
hello,

im working on somthing where a chopper starts crashing and i use black out to simulate the player hitting his head, and then i want the player to be taken out of the chopper and put on a GL on the ground named g1 all right before the chopper hits the ground.

I tried using a script and triggers to blackout/ white in but even though the player safly is setposed on the ground about 3 seconds before the chopper crashes and explodes  it plays the music when you are dead and shows the player from above just like it would if the player is dead except that there is no You are dead and some quote, and also the player is still alive. i cant figure out how to get it to work. any help?


thanks
Title: Re:EJECT AND THEN SETPOS ON GROUND
Post by: THobson on 25 May 2005, 15:46:03
If you have not already - try

unassignVehicle player

just before the setPos
Title: Re:EJECT AND THEN SETPOS ON GROUND
Post by: Gogs on 26 May 2005, 17:08:01
Erm... Are you sure its not the chopper exploding near him thats causing him to die? Also, put a
aP setvelocity [0,0,0]
in there so that he isn't still moving when he "hits" the ground.....

Oh, sorry misread. Hes still ALIVE! OK, you've got some camera scripting in the scripts you've used. All you need to blackout is the line
titlecut [" ","BLACK out", time ]
and to black in
titlecut [" ","BLACK in", time ]
Any reference to cameras, such as _cam camcreate, delete that, its causing your problem....
Title: Re:EJECT AND THEN SETPOS ON GROUND
Post by: penguinman on 27 May 2005, 01:25:26
atcualy the cameras were done with triggers :-[
Title: Re:EJECT AND THEN SETPOS ON GROUND
Post by: UNN on 27 May 2005, 02:04:27
Hi,

Try using the GetOut action with a slight pause, before setpos :

Quote
GETOUT: unit action ["getout",vehicle]

Code: [Select]
Player Action ["getout",_Heli]
@((Vehicle Player)==Player)
Player SetPos _Pos

Just setpos'ing a unit out of a vehicle can cause problems sometimes?
Title: Re:EJECT AND THEN SETPOS ON GROUND
Post by: penguinman on 28 May 2005, 23:52:06
oh, yep it works thanks :)