If a player is sitting on the respawn screen, any attempt at executing code on the player with the ||| side player == side ||| command does not work on them
Description
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 7
- Category
- Scripting
Place a playable unit and make the mission for a dedicated server.
Make sure debug console is enabled
Place a marker called 'respawn_west'
Make sure your description has
respawnonstart = 1;
respawnTemplates[] = {"MenuPosition","Tickets"};
Run the mission
Whilst on the respawn screen open the debug console, and enter any command you like using the side command. I'll give two examples.
if ( side player == blufor) then { hint "your are on blufor"; };
or
if ( side player == blufor) then { [player, 1 ] call BIS_fnc_respawnTickets; };
Context
I have a multiplayer scenario that is supposed to check if there are any blufor players dead at a certain time. If these blufor players are dead then they should be given an extra ticket.
if (!alive player && side player == blufor) then { [player, 1] call BIS_fnc_respawnTickets; };
Event Timeline
Oh i see.
So how do you distinguish between an Opfor player and A Blufor player when executing code on them when they are dead. Using civilian would still apply the code to both, when you only wish to target one
You can add variable to all units on init/spawn :)
<unit> setVariable ["mySideVar", side <unit>]