OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Mysterious Hu on 29 Mar 2009, 15:56:48

Title: Ungroup Player
Post by: Mysterious Hu on 29 Mar 2009, 15:56:48
Hi, is there an script funtion to remove a player from a group?  ???

In my multiplayer mission I want to remove players from their current groups when they die and create a new group attached to each player when he respawns. The second bit I can do. The first bit, however (removing the player from his old group), I cannot find in the ComRef.  :blink:
Title: Re: Ungroup Player
Post by: i0n0s on 29 Mar 2009, 15:57:51
Code: [Select]
[Player] join grpNullRemoves the player from his current group
Title: Re: Ungroup Player
Post by: Mysterious Hu on 29 Mar 2009, 16:26:20
Ta - I'd realised that I was coming at it from the wrong end and so tried out this: starting from a "Killed" eventhandler

_bloke = _this Select 0
_oldgroup = group _bloke
_newgroup = creategroup west

[_bloke] join _newgroup

exit

Leaving me with the old group to mess around with in the script too.