Page MenuHomeFeedback Tracker

playableUnits returns empty array in SP
Closed, ResolvedPublic

Description

The playableUnits scripting command returns an empty array in single player mode even when the mission contains units that are set as playable. This discrepancy prevents consistent scripting between SP and MP, and it makes it overly difficult to maintain a list of switchable units in SP.

Details

Legacy ID
646867899
Severity
Major
Resolution
Not A Bug
Reproducibility
Always
Category
Scripting

Event Timeline

Celery edited Steps To Reproduce. (Show Details)Mar 9 2013, 1:42 AM
Celery edited Additional Information. (Show Details)
Celery set Category to Scripting.
Celery set Reproducibility to Always.
Celery set Severity to Major.
Celery set Resolution to Not A Bug.
Celery set Legacy ID to 646867899.May 7 2016, 11:51 AM

Intended behavior, use switchableUnits in singleplayer:
http://community.bistudio.com/wiki/switchableUnits

Combine them together to make sure returned array is both SP and MP combaptible:
(switchableUnits + playableUnits)

Mass close.