Functions
Accessed through the JumpLib global
boolean
CanJump(Entity entity)
Returns true if the entity is not jumping or the current jump has the OVERWRITABLE flag
boolean
Jump(Entity entity, JumpConfig config, boolean force = false)
Makes the entity jump using the provided config
Force argument ignores all PRE_ENTITY_JUMP callback returns
boolean
TryJump(Entity entity, JumpConfig config)
Calls JumpLib.Jump if JumpLib.CanJump returns true
boolean
QuitJump(Entity entity)
Immediately ends the current jump
Returns true if a jump was cancelled, false otherwise (if not jumping)
boolean
Pitfall(EntityPlayer player, Vector position, int damage = 1)
Begins pitfall sequence
boolean
IsPitfalling(EntityPlayer player)
JumpData
GetData(Entity entity)
Returns a non-writable JumpData table
Use JumpLib.Internal.GetData to get a writable InternalJumpData table
boolean
SetHeight(Entity entity, float height, JumpConfig config = nil)
Sets height of an entity if already jumping
If not already jumping, and config is provided, a jump with the proved config is started at the provided height
void
ClearTag(Entity entity, string tag)
Removes a tag from the current jump
boolean
SetSpeed(Entity entity, float speed)
Sets speed of current jump
Can be modified in PRE_ENTITY_SET_FALLSPEED
Ignored by jumps with the IGNORE_FALLSPEED_MODIFIERS flag
Vector
GetOffset(Entity entity, Vector yOffset = 0)
Returns a render offset for non-laser entities that is automatically adjusted for reflections
Returns a position offset for lasers
boolean
IsFalling(Entity entity)
void
Update(Entity, entity)
Updates the current jump by 1 frame
table
RunCallbackWithParam(JumpCallback id, entity Entity, ...)
Runs a callback with JumpLib's special optional parameter and returns a table of all function returns
Accessed through JumpLib.Internal
boolean
IsOrbital(EntityFamiliar familiar)
boolean
IsFollower(EntityFamiliar follower)
void
ScheduleFunction(function fn, int delay, boolean persistent = false)
InternalJumpData
GetData(Entity entity)
Returns writable InternalJumpData
void
RemoveCallbacks()
Please don't use this
void
UpdateCollision(Entity entity)
EntityPlayer?
GetPlayerFromEntity(Entity entity)
Checks entity.Parent, entity.SpawnerEntity, and familiar.Player
Last updated