Difference between revisions of "GetLocalPlayerEntityId"

From Nomad DB
Line 20: Line 20:
 
* [[EntityId]]
 
* [[EntityId]]
  
[[Category:WD2 Lua]]
+
[[Category:WD2 Lua]] [[Category: WD2 Player]]

Revision as of 18:05, 14 April 2020

This functions return the Entity Id of the local player. The returned id should be checked against the Invalid Entity Id.

Syntax

GetLocalPlayerEntityId()

Example

The example below checks to see if the Entity Id for the player is valid.

local lplayerId = GetLocalPlayerEntityId()
if lplayerId == GetInvalidEntityId() then
	print("Local Player is valid")
else
	print("Invalid Local Player")
end

Related Pages