OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: spookdi on 19 Dec 2007, 04:07:28

Title: Unloading Squads of Transports
Post by: spookdi on 19 Dec 2007, 04:07:28
I have a bit of a problem with a mission im working on.
I have a squad of 4 APCs and each has a squad of infantry inside and the APCs go to a transport unload point but only the leader of the APC squad disembarks its troops. I made a diagram.
(http://i77.photobucket.com/albums/j50/spookdi_jedd/problem_diag.jpg)
I need a way for all the APCs to disembark their troops when they reach the waypoint.
Thx
Title: Re: Unloading Squads of Transports
Post by: schuler on 19 Dec 2007, 12:46:54
I would look at some of the waypoint tutes http://www.ofpec.com/ed_depot/index.php?action=list&game=OFP&type=tu&cat=xyz and look at snyc’s,,,, very important ;)
….. theres many different ways to do this! But It depends on if your in the 1st squad as squad leader? And if theres waypoints after the unload. Can you give more info? please  :)
  Otherwise you might do something like this---
Name all the squad’s,,,,  name = group this, like, squad1= group this and squad2= group this, ect. Put that in the leaders init of each squad. Then name all the apc’s, apc1, apc2, ect put that in the name of the unit.
    give all the apc there own way point. to the lz.
Put this in the init of the waypoint apc1 is unloading, copy and paste-
Quote
cmd="EJECT"; "_x action [cmd,apc1]" foreach units squad1; cmd="EJECT"; "_x action [cmd,apc2]" foreach units squad2; cmd="EJECT"; "_x action [cmd,apc3]" foreach units squad3; cmd="EJECT"; "_x action [cmd,apc4]" foreach units squad4;
i would use a script my self on this one,,, but if this helps ya.  :scratch:
one of the other staff might come along and point you in a different direction  :good: cheers
edit changes spelling of squad  :confused:
Title: Re: Unloading Squads of Transports
Post by: spookdi on 20 Dec 2007, 05:05:40
Thanks for the reply.

Well i really don't want to give each apc a waypoint because the idea is that the squad of apcs can maneuver around in formation.
 And also i would like to go for a more natural type get-out-one-at-a-time disembark. Is there some way to script a squad leader to issue a ALL Disembark so i could just have the squadleaders order their troops out triggered by the unload waypoint. :scratch:

Also at this stage i'm just playing as a squad member, all the squadleaders and apc are AI.

I'll try that script now.
Title: Re: Unloading Squads of Transports
Post by: Mr.Peanut on 30 Dec 2007, 22:48:59
Code: [Select]
unitArray orderGetIn orderWhere order is true or false. When the AI gets out, they will still try to follow the waypoints. You may have to use a lockWP TRUE  or better yet, set a condition for the following WP.