OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: punisher on 01 Jan 2003, 17:08:23

Title: Ejecting
Post by: punisher on 01 Jan 2003, 17:08:23
hi
i am pretty new to editing but i know some things i need quite a detailed description on how to make soldiers eject from a plane or chopper.I know how to do it if they are in my groop but not otherwise please help!!!
thanx
Title: Re:Ejecting
Post by: Silver Fox on 02 Jan 2003, 00:32:37
I have the code but i dont have time to crank up flashpoint.

If noone has told you when i come on tomorrow then ill sort you out with it.

Sorry matey (wait like a good boy)

 :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\ :-\
Title: Re:Ejecting
Post by: Conflict109 on 02 Jan 2003, 03:16:03
ok this is what i use, but im a noob at alll this stuff compared to everyone else on here, but i found this was a great option especially since i suck at writing the sqs files in notepad.... any ways here it is-
unitname action ["eject", vehicle unitname]
the way it works is you would make a plane or something that flies carry you're troops, (unfortunately with this method requires you to make a trigger with the same code in it for each troop) you put the code into the init box, make sure the plane or helo has a waypoint passing thru its area, and there u go.....
uh heres an example as well as i can break it down

Man action ["eject", Vehicle Man]

"man" is the unit you would like to eject from whatever is carrying it, it's a bit tedious and there is probably an easier way i don't know about cuz i'm a noob, but this works for me- hope it helps....if you're still unclear give me a hint of whats buggin ya an i'll see if i can help....and if you find an easier way, share the wealth.
Title: Done
Post by: punisher on 02 Jan 2003, 14:50:05
thanx pal
it worked!!!! its anoying having to paste all the time isent it
Title: Re:Ejecting
Post by: Ranger on 02 Jan 2003, 18:54:37
Did you search the editors depot?  There's already one or more scripts there that will do exactly what you want without you having to create a separate trigger for each unit.  It'll save you a lot of work.

Remember, kids: search first, ask later.  You can save yourself a lot of time and effort, not just the time of others.  :D
Title: Re:Ejecting
Post by: Conflict109 on 03 Jan 2003, 03:50:56
lol i hate pasting that crap, anyways i said i suck at sqs.....w/e i'm reading some of the snippets, i still dont get it, oh well. happy it helped even tho its annoying as hell
Title: Re:Ejecting
Post by: dmakatra on 03 Jan 2003, 11:28:18
why do you have to make a trigger for each eject action? why not set an ";"?
Title: Re:Ejecting
Post by: Conflict109 on 04 Jan 2003, 02:54:08
because i had no idea i could do that....(<--newbie)
Title: Re:Ejecting
Post by: Messiah on 04 Jan 2003, 03:07:33
umm - by just doing that, then if u eject from a chopper, the chopper will land and the men will run after the chopper and get back in...

this is cos u havnt unaasigned the men from the aircraft - and so they think they HAVE to be in it.

use the following script:

Code: [Select]
; Script name : parachute.sqs

_units = units group (_this select 0)
_helicopter = _this select 1
_i = 0
_Max = count _units
#Here
(_units select _i) action ["EJECT",_helicopter]
unassignvehicle (_units select _i)
_i=_i+1
~1
?_Max>_i:goto "Here"
exit

execute it using:

[leaderofgroupname, choppername] exec "parachute.sqs"
Title: !!!!!
Post by: punisher on 04 Jan 2003, 15:05:48
where do you put the  script i know how you would execute it but not where to put all that stuff
Title: Re:Ejecting
Post by: icarus_uk on 04 Jan 2003, 16:20:44
Goto your OPerationFlashpoint> Users >Punisher (or whatever your game name is)> Missions> And then the mission name Folder.  And put the script in there.
Title: Re:Ejecting
Post by: Messiah on 04 Jan 2003, 16:39:04
yeah, lol, sorry - copy all the stuff in the brown box and paste it into notepad - then save it as parachute.sqs and save it where icarus said.

hey icarus - double teaming here  :)
Title: Re:Ejecting
Post by: punisher on 04 Jan 2003, 18:39:55
i all most got it i just need to know where to put the [leaderorgroupname...... thingy about is it on the  aircraft waypoint on activation bit.Or leaders init!!!!!!
please help
Title: Re:Ejecting
Post by: Messiah on 04 Jan 2003, 19:03:36
u write that in the on activation part of either the waypoint u want it to occur at (choppers) or in a trigger.
Title: Re:Ejecting
Post by: punisher on 05 Jan 2003, 15:39:45
for fuck sake its not working!!!!!! :'(
Title: Re:Ejecting
Post by: Messiah on 05 Jan 2003, 17:35:07
if all these answers are 'yes' then i will make you an example mission...

1. Have you named the chopper correctly?

2. Have you named the leader of the group?

3. Have you saved the script into you mission folder as parachute.sqs AND as an .sqs file?

3. Have you written [groupleadername, choppername] exec "parachute.sqs" in the on activation field of a trigger or a waypoint of the chopper?

4. Are the men in a seperate group from the chopper and are moveincargo into the chopper?

5. Have you tried to place a hovering chopper with the men in and execute the script using a trigger that is called by radio Bravo?


hopefull the problem will be found after those questions.  ;)

Title: Re:Ejecting
Post by: Silver Fox on 07 Jan 2003, 00:59:05
This is how i get people to eject:

_guy action["EJECT",_chopper]; unassignvehicle _guy


It works a treat  :D

Just put it in a trigger of even .sqs it works both ways.


Jumping out of a chopper? MADNESS
Title: Re:Ejecting
Post by: Silver Fox on 07 Jan 2003, 01:01:23
AHHHHHHHHHHHHHHHHHHHHHHH messed up my italics

_guy action["EJECT",_chopper]; unassignvehicle _guy

_guy          = your guys name
_chopper   = your choppers name

 :-\
Title: Re:Ejecting
Post by: Tomb on 07 Jan 2003, 01:06:18
yeah, lol, sorry - copy all the stuff in the brown box ...


  :o  :o  :o The quotes box is brown?!!  :o  :o  :o

*G, I need to check my screen settings*  :P

no wonder I never liked the "new" quote system!

roflmao  ;D