Difference between revisions of "MDE Scripting: GetActivePlayer"

From Nomad DB
(Created page with "{| class="wikitable" !Syntax |<syntaxhighlight lang="lua">game.game:GetActivePlayer()</syntaxhighlight> |- !Module |Game |- !Library |MD...")
 
Line 14: Line 14:
  
  
== Description ==
+
==Description==
 
Returns the [[MDE Scripting: Entities#Player|Player]] entity.
 
Returns the [[MDE Scripting: Entities#Player|Player]] entity.
  
  
== Returns ==
+
==Returns==
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
 
!#
 
!#
Line 25: Line 25:
 
|-
 
|-
 
|1
 
|1
|entity
+
|Entity (SceneObject)
 
|[[MDE Scripting: Entities#Player|Player]] entity
 
|[[MDE Scripting: Entities#Player|Player]] entity
 
|}
 
|}
  
  
== Example ==
+
==Example==
 
{| class="wikitable"
 
{| class="wikitable"
 
|<syntaxhighlight lang="lua">
 
|<syntaxhighlight lang="lua">
Line 36: Line 36:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
|}
 
|}
 +
  
  

Revision as of 00:01, 16 October 2020

Syntax
game.game:GetActivePlayer()
Module Game
Library Game
Game Mafia: Definitive Edition


Description

Returns the Player entity.


Returns

# Type Description
1 Entity (SceneObject) Player entity


Example

local Player = game.game:GetActivePlayer() -- Player returns the player