Skip to content

Class "EntityPtr"⚓︎

Info

This class can be accessed by using its constructor:

Example Code
1
local myPointer = EntityPtr(Isaac.GetPlayer())

Constructors⚓︎

Entity·Ptr ()⚓︎

const EntityPtr EntityPtr ( Entity )⚓︎

The constructor is a global function. For example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
local playerPtr = nil

local function postPlayerInit(player)
  playerPtr = EntityPtr(player)
end

local function postGameStarted()
  local player = getPlayerFromPtr(playerPtr)
end

local function getPlayerFromPtr()
  if playerPtr == nil then
    return nil
  end

  if playerPtr.Ref == nil then
    return nil
  end

  return playerPtr.Ref:ToPlayer()
end

Functions⚓︎

Set·Reference ()⚓︎

void SetReference ( Entity ref )⚓︎


Variables⚓︎

Ref⚓︎

Entity Ref⚓︎



Last update: April 26, 2024