OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GW on 26 Oct 2012, 07:57:32
-
i am making a mission,
in mission there are three squads,how can i join and leave them again and again. :scratch:
-
Do you mean that you want the player to leave and join groups at anytime?
Well, to leave a group, you use
[player] join grpNull
So, to join a group again afterwards you should be able to just:
[player] join _leader
_leader is a local variable which is the group leader of the group you want to join.
Make sure _leader is defined as:
_leader = (leader groupname)
I'm not near a computer with CWA on right now, otherwise I would check. Hopefully this'll work
Regards,
Gruntage
-
any demo mission ?
-
any help for thread question? ::)
-
What sort of help? He answered your first question a year and half ago. You want to join a group? Make sure you have named that group in it's leaders init field.
Alpha = group this
Then when you need the player or any unit to join that group, just place in a trigger or script Player join Alpha
or CustomNamedUnit join Alpha
To remove the player or unit from his current group place this in a trigger or script player join GrpNull
or CustomNamedUnit join GrpNull
You could also do this using waypoint orders such as "Join" or "Join and Lead".
-
actually i have 3 groups of 10 soldiers,want to lead them and stop enemies on three fronts.
:(
-
So you want to be able to control 3 groups?
That would require a command interface of some kind, either a dialog or simply using the radio (0-0-?).
If you wanted to move a group to a location on the map, you could use 'onmapsingleclick' (see COMREF).
Another thing you could do is have a repeating radio trigger that moves a group to the location of the player at any time.
Or are you saying that you want to join each group successively? It would easier to move troops using the radio trigger solution.