Page MenuHomeFeedback Tracker

Loadout assignments with Unit init scripts cause all other units to lose all equipment when someone JIP
New, WishlistPublic

Description

I have used unit scripts on units to set loadouts on specific units. This works great except when someone joins in the middle of the mission. When someone JIP the person who joins gets his equipment, but all others become naked.

Details

Legacy ID
3021465899
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

1 set 2 units init to give them a set loadout ( like a rifle, clothes, etc)
2 start session with only one person playing
3 have another player connect to server and join game as other unit.
4 observe first unit loses his gear, and second man gets gear.

Event Timeline

yibbachester edited Additional Information. (Show Details)
yibbachester set Category to Scripting.
yibbachester set Reproducibility to Always.
yibbachester set Severity to None.
yibbachester set Resolution to Open.
yibbachester set Legacy ID to 3021465899.May 7 2016, 7:06 PM

Limit init to the server

init = "if (isServer) then {...your code...}";

or

init = "if (!isServer) exitWith {}; ...your code...";