Home   Help Search Login Register  

Author Topic: make troops eject  (Read 926 times)

0 Members and 1 Guest are viewing this topic.

Offline punisher

  • Members
  • *
make troops eject
« on: 14 Dec 2002, 19:13:39 »
i know how to make them eject if you are in their groop but no it if they are enemy troops controled by AI .please help peps thanx
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

Kaliyuga

  • Guest
Re:make troops eject
« Reply #1 on: 14 Dec 2002, 19:47:42 »
name your enemy group using;

g1 = groupthis

in the leader's init line..  

then make a script called jump.sqs

**********************************************
_grp = _this select 0
_vehicle = _this select 1

_aunits = units _grp
_i = 0
_j = count _aunits

#Here
(_aunits select _i) action ["EJECT",_vehicle]
_i=_i+1
~1.4
?_j>_i:goto "Here"

exit
**********************************************

Then.. call the script like this:

[g1,heli1] exec "jump.sqs"


where   g1 = group name  
and  heli1 = chopper name

;)

this should  work for any group...  Player controlled or not ;)

Kaliyuga out   :cheers:

Offline punisher

  • Members
  • *
Re:make troops eject
« Reply #2 on: 15 Dec 2002, 13:41:54 »
man thats a bit to complicated
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

Respined

  • Guest
Re:make troops eject
« Reply #3 on: 15 Dec 2002, 13:44:05 »
The easiest thing is to put your units jump from helicopter or plane with waypoint command GET OUT to every ejectin' units
but thats not very useful try this......

_aunits = units (set the name of soldier that you are playin')
_i = 0
_Max = count _aunits
#Here
(_aunits select _i) action ["eject",(the name of plane or helicopter who drops your team)]
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_Max> _i:goto "Here"
exit

and write this string to waypoints on activasion file(waypoint where you want to drop your crew): this exec "(jump.sqs)"

Put your name as PLAYER
and if you have group put this text string to all your men to init field like this:grp = group this; this moveincargo (the name of copter or plane) and the game starts inside the vehicle with your men :)

Offline punisher

  • Members
  • *
Re:make troops eject
« Reply #4 on: 15 Dec 2002, 15:35:40 »
so remind me where does all that coding stuff go on the waypoint or man ?? aaaah
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

PENNYWISE

  • Guest
Re:make troops eject
« Reply #5 on: 15 Dec 2002, 18:00:45 »
that goes into a .sqs file (thats a script) which u put in your mission folder (operation flashpoint\users\your username\missions\mission name\)

Totibbs

  • Guest
Re:make troops eject
« Reply #6 on: 16 Dec 2002, 01:09:22 »
sorry kaliguya, but your solution does not work with me... >:(

Ive hardly no eXperiance with ejection scripts, so Ive copy/paste your script between the *** *** and but this in the leaders line:

g1 = groupthis; this moveincargo helo

(where helo is the name of the chopper)

this is in the "on activation" line of the trigger (activation: west,present)

[g1,helo] exec "eject.sqs"

where "eject.sqs" is refeared to your "jump.sqs"

and this is what in eject.sqs is:

Quote
_grp = _this select 0
_vehicle = _this select 1

_aunits = units _grp
_i = 0
_j = count _aunits

#Here
(_aunits select _i) action ["EJECT",_vehicle]
_i=_i+1
~1.4
?_j>_i:goto "Here"

exit

hope you can help me :)

And I know the trigger gets activated, because Ive made a sound effect in it when the triger is activated, and I hear that effect. :)
« Last Edit: 16 Dec 2002, 01:17:40 by Totibbs »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:make troops eject
« Reply #7 on: 16 Dec 2002, 01:57:28 »
Lol @ Kali

da
Quote
g1 = groupthis; this moveincargo helo

should b

Code: [Select]
g1 = group this; this moveincargo helo
also da code wil b lot beter like dat :P

Code: [Select]
_grp = _this select 0


_aunits = units _grp
_j = count _aunits

#Here
_j = _j - 1
? _j < 0 : exit
(_aunits select _j)  action ["EJECT",_vehicle (_aunits select _j)]
~1.4
goto "here"

wil work

LCD OUT

P.S - exec it [g1] exec "scriptname.sqs"
« Last Edit: 16 Dec 2002, 11:13:43 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Totibbs

  • Guest
Re:make troops eject
« Reply #8 on: 16 Dec 2002, 10:40:35 »
|#|] Invalid number in expression

LCD, Ive copy/pasted your scrip now, but I got this error:

|#|] Invalid number in expression

so nothing happens...

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:make troops eject
« Reply #9 on: 16 Dec 2002, 11:15:23 »
fixed da script in da original post - try it now ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Totibbs

  • Guest
Re:make troops eject
« Reply #10 on: 16 Dec 2002, 16:46:20 »
(_aunits select _j)  action ["EJECT",_vehicle (_aunits select _j)]

error unkown operator...

maybe the problem is, that I dont know how to give a group a name... ???

PENNYWISE

  • Guest
Re:make troops eject
« Reply #11 on: 16 Dec 2002, 17:27:45 »
group this setGroupId ["Bravo", "GroupColor3"]

^ ? :)

Totibbs

  • Guest
Re:make troops eject
« Reply #12 on: 16 Dec 2002, 19:22:26 »
thx but it doesnt solve the problem. maybe because I copy/pasted it on top of the (not working) script LCD gave me...

I really need a 0 hard-rated script. because I have no experiance at all with ejecting scripts, but Id like to learn  8)