OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 15 Jan 2005, 16:58:54

Title: Group Question
Post by: greg147 on 15 Jan 2005, 16:58:54
Hi all,

How do I get a guy from a group to leave that group and then join another group as its leader?

Thanks
Title: Re:Group Question
Post by: dmakatra on 15 Jan 2005, 17:00:37
[dude1] join alphagrp
[dude2,dude3,dude4,dude5,dude6] join alphagrp

Should do the trick. ;)

:beat: *Gets Shot* :beat:
Title: Re:Group Question
Post by: greg147 on 15 Jan 2005, 17:02:00
OK, thanks  ;D
Title: Re:Group Question
Post by: THobson on 17 Jan 2005, 02:54:42
Actually I would have thought
dude1 join grpNull
units betagrp join dude1

is what you want.  (Where dude1 starts in alphagrp)
Title: Re:Group Question
Post by: greg147 on 17 Jan 2005, 17:38:56
OK, i'll try that as well. The other one worked OK, but i'll have a go at both  ;)
Title: Re:Group Question
Post by: Triggerhappy on 17 Jan 2005, 17:49:42
correction of THobsons:

[dude1] join grpNull
units betagrp join dude1

join takes an array

tsk tsk tsk THobson, silly little mistakes  ;D :P
Title: Re:Group Question
Post by: THobson on 17 Jan 2005, 17:56:18
I am always forgetting those damned square brackets when it is only one guy! ::)

Anyway what's with the plural?  Surely you are not counting missing a [ and missing a ] as separate mistakes! ;)
Title: Re:Group Question
Post by: Triggerhappy on 17 Jan 2005, 18:03:49
uhhh.... i don't know....its more like a generic comment
Title: Re:Group Question
Post by: greg147 on 17 Jan 2005, 18:19:03
I tried THobsons way (with the brackets) but I couldn't get that to work. It just said '1 follow 1' and that was it.  :-\
Title: Re:Group Question
Post by: THobson on 17 Jan 2005, 20:55:24
1 join 1 is when dude1 joins grpNull.  

Do you have a group called betagrp with people in it?  You need to give the group a name, in this case betagrp.

If you do the second instruction will cause them to join dude1 with him as the leader of the group.  


Really this second line is the same as dmakatra's method.  Where his and my method differ is really only in the first instruction.  Telling dude1 to join a group will not make him the leader of that group, but will get him out of his current group.  Telling him to join grpNull gets him out of the current group, you then get the other guys to join him (and so make him the leader), either by using dmakatra's method of naming each individual unit, or my method of using a group name.  As I said in principle the second instructions are equivelent in both methods