Page MenuHomeFeedback Tracker

The "setplayable unit" command doesn't work
Assigned, WishlistPublic

Description

It looks impossible to make a unit playable with the setplayable command.

Details

Legacy ID
1111712412
Severity
None
Resolution
Open
Reproducibility
Always
Category
Editor
Steps To Reproduce

in the editor :

  • Place a blufor unit as player
  • Place a nonplayable unit
  • Name it (let's say Newfriend1)
  • Place a presence trigger activated by blufor and put this code in the Activation field : setplayable Newfriend1

Lunch the preview, enter into the trigger zone and try to switch unit to play Newfriend1.

Event Timeline

brunova1807 edited Additional Information. (Show Details)
brunova1807 set Category to Editor.
brunova1807 set Reproducibility to Always.
brunova1807 set Severity to None.
brunova1807 set Resolution to Open.
brunova1807 set Legacy ID to 1111712412.May 7 2016, 1:55 PM
brunova1807 edited a custom field.
Phalanx added a subscriber: Phalanx.May 7 2016, 1:55 PM

Just tried this command in my mission as I really wanted the mechanic.. and it doesn't work, disappointing.

Hoping BIS will see this.

Edit: It may be worth looking at the addSwitchableUnit command too, since that doesn't seem to work either

any acknowledgement on this issue?

B00tsy added a comment.Sep 4 2013, 5:24 AM

Still does not work.

It doesn't work even with dynamically created units i.e. createUnit

Just did some testing. setplayable does not set unit playable in a sense that it does not appear in playableUnits array. However it is still possible to switch to a unit with selectPlayer regardless.

Any chance of at least investigating this issue?

If you use setPlayable command first then addSwitchableUnit command for the same unit it works

KeyCat added a subscriber: KeyCat.May 7 2016, 1:55 PM
KeyCat added a comment.May 7 2014, 7:00 PM

@dippysea: Do you mean in SP? Can you be a bit more specific? Just tried and it does not work in MP.

@devs: Any acknowledgement or possible workaround for this issue?

B00tsy added a comment.May 9 2014, 3:29 PM

You need to add 'AddSwitchableUnit' too. Works for me also in MP.

SetPlayble = ["Unit1", "Unit2"]; addSwitchableUnit = ["Unit1", "Unit2"];

Are you sure it works in MP? I mean... does it add a new playable slot in the lobby for the created units? I'm on stable and cant get it to work here.

I have only used it with other AI, the AI becomes playable and switchable (last time I tried). No idea if it actually creates new slots in the lobby.

It doesn't work for me in MP either (addSwitchableUnit seems to work in SP) and I doubt that example mentioned by B00tsy could work in Arma 3. This is way how to define a global variable, both these commands (and basically all commands in Arma) use different syntax.

Ilias added a subscriber: Ilias.EditedAug 6 2017, 5:28 PM

B.I. PLeeease fix it

Still an issue preventing me from doing some cool stuff.

As usecase was requested:

Creating an "infinite" spectator slot for missions where respawns are disabled and people moved to spectator manually (some PvP events). If a user crashes while spectating, his slot is no longer available in the slot selection and thus he is "stuck". Creating a spectator slot and then a new one when the first one gets occupied will allow crashed players to join back in as spectator. Similarly, if someone dies due to a bug, our current respawn creates a unit and uses selectPlayer to give the affected player control. However, if he crashes/anything happens to this new unit, the player is out of luck.

Another use case could be adding slots for players in a mission based on mission progression. Let's say there's a task to rescue a pilot or engineer. If the mission is completed, a new playable slot can be unlocked, allowing players to take control of planes, helicopters, or faster repairs.