OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SharkDog on 06 May 2003, 21:03:13
-
Hello again my fellow ofpers,
How do i turn a fire on from the start of the map?
-----kidding :P-----
No the real question is how do I get a squad to split through the middel like a 12 men squad splits to two small squads, but if 6 men die the reamaining squad splits in to two 3 men squads.
thanks in advance :D
-
Well you could use the group null command
MyGuy Join GrpNull
Example
man1 (leader)
man2
man3
man4
man5
man6
man7
man8
man9
man10
man11
man12
Update #1 CrashnBurn's suggestion ;)
Trigger
Activated by "West"
Present
Activation Field: [man7,man8,man9,man10,man11,man12] join grpnull
sync to second trigger
Activated by "West"
Not Present
Countdown: 1 1 1
Activation Field: [man8,man9,man10,man11,man12] join man7
I believe that could work.... I know there is a much, much easier way but I could not find it.
-
allow me to clean up your work a bit Iwesshome-
[man7,man8,man9,man10,man11,man12] join grpnull
[man8,man9,man10,man11,man12] join man7
Remember the newly formed group won't have waypoints, so give the leader (man7) move commands to get them going.
-
Ok... now the Move part.
group move pos
Operand types:
group: Object or Group
pos: Array
Type of returned value:
Nothing
Description:
Creates waypoint move on given position (format Position) and makes it actual group waypoint.
Example:
groupOne move getPos player
so... man7 move [x,z]
If so the second trigger should look like this...
Activated by "West"
Not Present
Countdown: 1 1 1
Activation Field: [man8,man9,man10,man11,man12] join man7; man7 move [x,z]
Correct ???
-
2 addictions:
if you need the new group to have WPs: create a man with his WPs and in its init field put: "NewGroup = group this; delevehicle this" this will create a group named NewGroup with WPs and delete the man just after creating it, but the group and WPs will remain active. Use this group instead of GrpNull in the examples given by the oteh fellows.
If you want to control the number of the 2 splitted groups like you said you have to count the remaining men and play with the select command to choose half of the men in one group and the other half in the other group. Clear? ;D
simon