OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: laggy on 03 Dec 2009, 22:25:04

Title: setPlayable and addSwitchableUnit in MP
Post by: laggy on 03 Dec 2009, 22:25:04
Dear all,

Setup:

In a mission you first play as a force recon team who sabotage an enemy base to prepare for a beach landing.
When the landing starts I want to include the new (friendly) landing troops as playable/switchable units.
With respawn "side" (now working in ArmaA 1.04) you can teamSwitch to any playable friendly-sided unit.
So when the landing troops arrive I execute these commands:

Code: [Select]
{setPlayable _x} forEach units grp1
Code: [Select]
{addSwitchableUnit _x} forEach units grp1
"grp1" is a landing group that has NOT been playable/switchable since mission start, but now should be.

Effect:

Works great in SP, but not in MP. The new setPlayable and addSwitchableUnit units never become available in MP.
Not even if you play as a host (where the AI in other groups are still local to you), so no point trying on a dedi.

Why doesn't it work?
Any ideas?

Thanks in advance,

Laggy
Title: Re: setPlayable and addSwitchableUnit in MP
Post by: mikey on 04 Dec 2009, 02:20:59
setPlayable is bugged (http://dev-heaven.net/issues/show/4461)
Title: Re: setPlayable and addSwitchableUnit in MP
Post by: laggy on 04 Dec 2009, 10:52:23
Thank you mikey  :good:

Will save me hours of frustration.
One last futile attempt might be to test if a unit is switchable without being set to playable.

Laggy