Page MenuHomeFeedback Tracker

Player Side Does Not Return When !Alive
Closed, ResolvedPublic

Description

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

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

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; 
};
Additional Information

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

danjoo created this task.Jul 26 2016, 2:04 PM

If object is dead then his side == CIVILIAN
playerSide can help you

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

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>]
neokika closed this task as Resolved.Nov 1 2016, 1:01 PM
neokika claimed this task.
neokika added a subscriber: neokika.

You can also use

private _actualSide = side group _dead;