Page MenuHomeFeedback Tracker

New server event handler: onPlayerSpawn
Acknowledged, WishlistPublic

Description

As it stands servermods (mods launched with -serverMod param which have no client side counterpart) do not have any easy, efficent way to determine when a player spawns.
Currently the easiest way to get this effect is to start looping all playableUnits when onPlayerConnect is triggered and evaluate each unit's UID, returning the object the player spawned in when a match is found. This is a potentially quite heavy process if lots of units are present in the mission and is open to problems if the unit is killed or disconnects before the loop finishes.

An engine-based eventhandler would be the most efficient method of achieving this effect and would work wonders for server-based mods.

Details

Legacy ID
526909417
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Feature Request
Additional Information

At minimum this eventhandler should return an object reference to the player's unit and some reference to the player themselves, be it an owner ID or steam UID. It should be invoked with addStackedEventHandler.

Event Timeline

Verox edited Additional Information. (Show Details)Jul 12 2015, 4:47 PM
Verox set Category to Feature Request.
Verox set Reproducibility to N/A.
Verox set Severity to None.
Verox set Resolution to Open.
Verox set Legacy ID to 526909417.May 8 2016, 12:21 PM
Bohemia added a subscriber: Verox.Jul 12 2015, 4:47 PM