OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: iamelhombre on 02 Oct 2011, 01:58:10

Title: groups
Post 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.
Title: Re: groups
Post by: Inlesco on 02 Oct 2011, 15:26:40
As far as I know, "Groups" F2 is useful to:


That's all I remember.
Title: Re: groups
Post by: h- on 02 Oct 2011, 20:18:35
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:
Code: [Select]
_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.