Class "Global Functions"
Last updated
Was this helpful?
Last updated
Was this helpful?
{: .abp .tooltip .badge }
Returns a object.
???- example "Example Code" Example usage:
{: .abp .tooltip .badge }
Returns a object.
???- example "Example Code" Example usage:
Returns a random integer. (0 to 2^32)
Returns a random vector with length 1. Multiply this vector by a number for larger random vectors.
???- example "Example Code" Example usage:
Returns a hash-value of the pointer given as an input value. Valid inputs are any Isaac object, including :::lua Entity
, :::lua Room
, :::lua RNG
, :::lua Sprite
, :::lua Game
etc.
It can be used to easily compare two entities, making equality checks very easy.
Example:
If you spawn a certain entity, save it in a variable and then compare it to the :::lua entity
parameter in :::lua MC_ENTITY_TAKE_DMG
, this comparison will never be true even if both variables refer to the exact same entity in the game. :::lua GetPtrHash()
turns pointer into a fixed number, which makes comparisons easier.
???- example "Example Code" Example on check if two entities saved in different variables are the same.
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Returns a object.
{: .abp .tooltip .badge }