When a player initially begins the mission as a rifleman but then switches to a pilot, the object type remains the same.
Description
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 10 x64
- Category
- Scripting
Run this script with the console to keep track of the player's object type:
[player] call BIS_fnc_objectType;
If the scenario's respawnOnStart is set to false, the object type of the unit the player selected in the lobby is the type that they will start with.
But, upon respawning as a different unit (i.e. starts as rifleman and then selects pilot), the object type does not change.
I am attempting to make a scenario that creates a group for the unit to command based off of what type of unit the player is, if the unit is a rifleman, they would get a group of riflemen, marksmen, etc. But if the player is a helipilot, they would get a group of helipilots or helicrew.
Now, I cannot do this if the game uses the object type of the initial object and not the current object of the player.
If this is meant to function like this, is there an alternative to getting the information needed for something like this?