OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: iamelhombre on 02 Oct 2011, 01:58:10
-
hey i am kind of new to this, but could someone explain the "group" script command ive looked every where and cant really get a good explanation.
-
As far as I know, "Groups" F2 is useful to:
- group units/groups together
- divide groups into individual units
- make a trigger dependant on any vehicle appearance in selectec area (it's fairly simple to use - group selected trigger with a unit, then edit trigger and select any option you want in "Activation" field inside the selection window
- quickly create quite accurate infantry/armor platoons
- create a marker "Empty", group it with selected unit and make possibility of appearance in any point of 50% (if you do the same with 2 markers instead of 1, it would be equal to 33%. This feature really helps to make mission a bit more dynamic
That's all I remember.
-
I think he meant the group scripting command (http://www.ofpec.com/COMREF/index.php?action=details&id=157&game=All) and not the gorups "menu" in the editor..
Anyway, the command returns the group the given unit belongs to so you can for example store it into a variable.
Simple sample code:
_var = group player;
hint format ["%1",_var];
Running that code (in a script) will show a hint message on the screen showing the group the player belongs to.