-
-
Abilities collection that character starts with.
- created on init
- Inherited From:
- Source:
-
-
Reference to abilities collection that character starts with, ig.Character#abilities.
- references on init
- Inherited From:
- Source:
-
activateCallback :function
-
Function called on activate.
- do not use this for predefined entity classes, override activate instead
- Inherited From:
- Source:
-
activateContext :Object
-
Context to execute activate callback function in.
- do not use this for predefined entity classes, override activate instead
- Inherited From:
- Source:
-
activated :Boolean
-
Whether entity's activate has been triggered,
- set to true to have an entity activate on init
- Inherited From:
- Default Value:
- Source:
-
<readonly> added :Boolean
-
Whether entity has been added to game world.
- Inherited From:
- Default Value:
- Source:
-
alpha :Number
-
Entity alpha.
IMPORTANT: applied to animations automatically on draw.
- Inherited From:
- Default Value:
- Source:
-
alwaysToggleActivate :Boolean
-
Whether entity's activate should override deactivate.
- Inherited From:
- Default Value:
- Source:
-
angle :Number
-
Angle of rotation in radians.
- Inherited From:
- Default Value:
- Source:
-
animationType :Number
-
Type of animation from ig.EntityExtended#animationTypes.
- used when creating animations from ig.EntityExtended#animSettings
- Inherited From:
- Default Value:
- Source:
-
animationTypes :Array
-
Types of animation.
- used when creating animations from ig.EntityExtended#animSettings
- Inherited From:
- Default Value:
- Source:
-
animAutomatic :Boolean
-
Whether character is allowed to set own ig.EntityExtended#currentAnim automatically based on current state.
- Inherited From:
- Source:
- See:
-
-
animFrameTime :Number
-
Default frame time in seconds for animations when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings
- Inherited From:
- Default Value:
- Source:
-
animInit :String
-
Name of animation to play when entity is ready and after spawned.
- Inherited From:
- Source:
-
animSequenceCount :Number
-
Default sequence frame count for animations when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings
- Inherited From:
- Default Value:
- Source:
-
animSettings :Object
-
Animation settings used to automatically create and add animations on initialization.
- use this instead of hardcoding animations into ig.EntityExtended#init for better inheritance!
- Inherited From:
- Default Value:
- Source:
Example
// previous method of adding animations
// this would likely be hardcoded into the init method
this.addAnim( 'idleX', 0.25, [0,1] );
// new (and improved?) method of adding animations
// which would be defined in the class properties
// properties match the parameters passed to ig.AnimationExtended#init
animSettings: {
// note here the directional animation name
// animations in Impact++ are directional and based on flip and facing
// so if an entity can flip X
// you should have animations for X
// i.e. "idleX"
// but if an entity can flip X and Y
// you should have animations for both X and Y
// i.e. "idleX" and "idleY"
// if an entity cannot flip X and Y
// you should have animations for Up, Down, Left, and Right
// i.e. "idleUp", "idleDown", "idleLeft", "idleRight"
idleX: {
// sequence frames 0 and 1
sequence: [0,1],
// quarter second per frame
frameTime: 0.25,
// play only once
once: true,
// do not play immediately
stop: true
// play animation in reverse
reverse: true
}
}
// then to easily change the sequence in a descendant class
// while retaining the original properties
animSettings: {
idleX: {
sequence: [3,4,5,6]
}
}
-
animsExpected :Array
-
List of names of animations this entity is expected to have.
IMPORTANT: when any animation in this list is not present, it will be filled by a placeholder animation!
- Inherited From:
- Source:
-
animSheetHeight :Number
-
Tile height of dynamic animation sheet.
IMPORTANT: use this for dynamically / run-time created entity types, not classes.
- Inherited From:
- Default Value:
- Source:
-
animSheetPath :String
-
Path to dynamic animation sheet.
- created on init
- automatically prepends shared base media directory from ig.CONFIG.PATH_TO_MEDIA
IMPORTANT: use this for dynamically / run-time created entity types, not classes.
- Inherited From:
- Source:
-
animSheetWidth :Number
-
Tile width of dynamic animation sheet.
IMPORTANT: use this for dynamically / run-time created entity types, not classes.
- Inherited From:
- Default Value:
- Source:
-
animTileOffset :Number
-
Default tile offset, within animation sheet, to start animation when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings
- Inherited From:
- Default Value:
- Source:
-
bounciness :Number
-
How bouncy entity is in collisions, between 0 and 1.
- Inherited From:
- Source:
- See:
-
-
canBreakTether :Boolean
-
Whether creature can break tether range to follow a prey or flee from a predator.
- Source:
- See:
-
-
canClimb :Boolean
-
Whether character is able to climb.
- Inherited From:
- Source:
-
canDieInstantly :Boolean
-
Whether entity can skip death animation if it dies while off screen.
- Inherited From:
- Default Value:
- Source:
-
canFlee :Boolean
-
Whether creature can flee.
- Source:
- See:
-
-
canFlipX :Boolean
-
Whether entity can flip animations vertically and set facing on x.
- Inherited From:
- Source:
-
canFlipY :Boolean
-
Whether entity can flip animations vertically and set facing on y.
- Inherited From:
- Source:
-
canJump :Boolean
-
Whether character is able to jump.
- Inherited From:
- Source:
-
canLearnPredators :Boolean
-
Whether creature can learn about new predators based on what it takes damage from.
- Source:
- See:
-
-
canPathfind :Boolean
-
Whether character is able to pathfind.
- Inherited From:
- Source:
- See:
-
-
<readonly> canWander :Boolean
-
Whether creature can wander, set automatically during update based on current status.
- Source:
-
canWanderX :Boolean
-
Whether creature can wander in x direction.
- Source:
- See:
-
-
canWanderY :Boolean
-
Whether creature can wander in y direction.
- Source:
- See:
-
-
<readonly> changed :Boolean
-
Whether entity has changed since last update.
- Inherited From:
- Default Value:
- Source:
-
checkAgainst :Bitflag|Number
-
Entities to check against, expanded for more flexibility and specificity.
IMPORTANT: for an entity to avoid being ignored in checks, it must either collide, checkAgainst, or have a type!
- Inherited From:
- Default Value:
- Source:
- See:
-
-
<readonly> checking :Boolean
-
Whether entity is checking against another entity matching ig.Entity#checkAgainst flag.
- Inherited From:
- Default Value:
- Source:
-
climbable :Boolean
-
Whether entity is climbable.
- Inherited From:
- Default Value:
- Source:
-
climbableStairs :Boolean
-
Whether entity is climbable as stairs.
IMPORTANT: has no effect unless ig.EntityExtended#climbable is true.
- Inherited From:
- Default Value:
- Source:
-
<readonly> climbing :Boolean
-
Whether character is climbing.
- Inherited From:
- Default Value:
- Source:
-
climbingControl :Number
-
Amount of acceleration control while climbing.
- Inherited From:
- Source:
- See:
-
Example
// no control of direction while climbing
character.climbingControl = 0;
// full control of direction while climbing
character.climbingControl = 1;
-
collides
-
Creature collides lite.
- Default Value:
- Source:
-
collidesChanges :Boolean
-
Whether an entity may change its ig.EntityExtended#collides property during gameplay.
IMPORTANT: this forces an entity to be included in collision checks, even if it does not collide, checkAgainst, or have a type
- Inherited From:
- Default Value:
- Source:
-
collidingWithEntitiesBelow :Boolean
-
Whether entity is colliding with one or more entities below.
- Inherited From:
- Default Value:
- Source:
-
collidingWithMap :Boolean
-
Whether entity is colliding with a wall, floor, ceiling, etc in collision map.
- Inherited From:
- Default Value:
- Source:
-
<readonly> collisionMapResult :Object
-
Entity's result from colliding with ig.GameExtended#collisionMap.
- created on init
- Inherited From:
- Source:
-
controllable :Boolean
-
Whether entity has control of itself and can move.
IMPORTANT: uncontrollable entities update but do not move or change!
- Inherited From:
- Default Value:
- Source:
-
-
Currently displaying animation.
- defers to ig.EntityExtended#overridingAnim
- Inherited From:
- Default Value:
- Source:
-
damageDelay :Number
-
Time in seconds between taking damage.
- automatically makes character invulnerable for delay length after taking damage
- Inherited From:
- Default Value:
- Source:
-
damageSettings :Object
-
Settings for particle explosion when damaged.
- settings exactly map to those of an ig.EntityExplosion
- Inherited From:
- Default Value:
- Source:
-
damageTimer :ig.Timer
-
Timer for damage delay.
- created on init
- Inherited From:
- Default Value:
- Source:
-
deactivateCallback :function
-
Function called on deactivate.
- do not use this for predefined entity classes, override activate instead
- Inherited From:
- Source:
-
deactivateContext :Object
-
Context to execute deactivate callback function in.
- do not use this for predefined entity classes, override activate instead
- Inherited From:
- Source:
-
deathSettings :Object
-
Settings for particle explosion when killed.
- settings exactly map to those of an ig.EntityExplosion
- Inherited From:
- Default Value:
- Source:
-
detectHiddenPredator :Boolean
-
Whether creature can detect hidden predators
- Source:
- See:
-
-
detectHiddenPrey :Boolean
-
Whether creature can detect hidden prey.
- Source:
- See:
-
-
<readonly> dieing :Boolean
-
Whether entity is in the process of dieing.
- Inherited From:
- Default Value:
- Source:
-
<readonly> dieingSilently :Boolean
-
Whether entity is in the process of dieing without effects or animation.
- Inherited From:
- Default Value:
- Source:
-
diffuse :Number
-
How much light is blocked when ig.EntityExtended#opaque.
- Inherited From:
- Source:
-
energy :Number
-
Energy statistic, by default used in abilities.
- Inherited From:
- Source:
- See:
-
-
energyMax :Number
-
Maximum energy statistic.
- Inherited From:
- Source:
- See:
-
-
-
Tether entity.
- Default Value:
- Source:
-
explodingDamage :Boolean
-
Whether characters should have a particle explosion when damaged
- explosions are created through an ig.EntityExplosion
- Inherited From:
- Source:
- See:
-
-
explodingDeath :Boolean
-
Characters should have a particle explosion when killed.
- explosions are created through an ig.EntityExplosion
- Inherited From:
- Source:
- See:
-
-
facing :Vector2|Object
-
Facing direction of entity based on velocity and look at.
- Inherited From:
- Default Value:
- Source:
-
<readonly> falling :Boolean
-
Whether character has not been grounded for a duration above ig.Character.ungroundedForAndFallingThreshold.
- Inherited From:
- Default Value:
- Source:
-
fixed :Boolean
-
Whether is fixed in screen vs inside world space.
- this is particularly useful for UI elements
IMPORTANT: fixed elements cannot have dynamic performance!
- Inherited From:
- Default Value:
- Source:
-
fleeHealthPct :Number
-
Percentage of health, between 0 and 1, when creature begins to flee.
- Source:
- See:
-
-
<readonly> fleeing :Boolean
-
Whether creature is currently fleeing.
Tip: creature can start with flee mode on.
- Default Value:
- Source:
-
<readonly> fleeingLowHealth :Boolean
-
Whether creature is currently fleeing due to low health.
- Default Value:
- Source:
-
flip :Boolean
-
Whether entity is flipped.
IMPORTANT: flip is now an object with x and y boolean values!
- Inherited From:
- Source:
-
friction :Vector2|Object
-
Friction of entity
- Inherited From:
- Source:
- See:
-
-
frictionGrounded :Vector2
-
Friction while on ground.
- Inherited From:
- Source:
- See:
-
-
frictionUngrounded :Vector2
-
Friction while in air.
- Inherited From:
- Source:
- See:
-
-
frozen :Boolean
-
Whether entity should skip updating.
- Inherited From:
- Default Value:
- Source:
-
gravityFactor :Number
-
Percent of gravity to apply, between 0 and 1.
- Inherited From:
- Source:
- See:
-
-
grounded :Boolean
-
Whether entity is grounded.
- Inherited From:
- Source:
- See:
-
-
group :Bitflag|Number
-
Group of entities to avoid checking against and colliding with.
Tip: as the group property is a bitflag, it can be any combination of groups!
- Inherited From:
- Default Value:
- Source:
- See:
-
-
<readonly> hasGravity :Boolean
-
Whether entity has gravity.
- set automatically during update
- Inherited From:
- Source:
-
health
-
- Inherited From:
- Source:
-
healthMax
-
- Inherited From:
- Source:
-
<readonly> hidden :Boolean
-
Whether entity is hidden and cannot be seen by other entities. Set via ig.EntityExtended#setHidden.
- Inherited From:
- Default Value:
- Source:
-
-
Whether entity is high performance, i.e. skips a lot of checks and adds/removals to increase speed at the loss of flexibility and functionality.
IMPORTANT: high performance entities don't check, don't collide, and are not interactive!
- Inherited From:
- Default Value:
- Source:
-
hollow :Boolean
-
Whether entity only casts shadows from edges when ig.EntityExtended#opaque.
- Inherited From:
- Default Value:
- Source:
-
ignoreSystemScale :Boolean
-
Whether entity elements should ignore system scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.IGNORE_SYSTEM_SCALE
- Source:
-
<readonly> intersecting :Boolean
-
Whether entity is intersecting another entity.
- Inherited From:
- Default Value:
- Source:
-
invulnerable :Boolean
-
Whether entity blocks all incoming damage.
- Inherited From:
- Default Value:
- Source:
-
<readonly> jumpAscend :Boolean
-
Whether character is in initial, ascending portion of jump.
- Inherited From:
- Default Value:
- Source:
-
jumpControl :Number
-
Amount of acceleration control while in air.
- Inherited From:
- Source:
- See:
-
Example
// no control of direction while in air
character.jumpControl = 0;
// full control of direction while in air
character.jumpControl = 1;
-
jumpForce :Number
-
Speed modifier to apply on each jump step.
- Inherited From:
- Source:
- See:
-
Example
// jump is slow and not very high
character.jumpForce = 1;
// jump is faster and higher
character.jumpForce = 10;
-
<readonly> jumping :Boolean
-
Whether character is jumping.
- to check if character is not on ground, use ig.Character#grounded.
- Inherited From:
- Default Value:
- Source:
-
jumpSteps :Number
-
Number of update steps to apply jump force.
- Inherited From:
- Source:
- See:
-
Example
// jump is short
character.jumpSteps = 1;
// jump is long
character.jumpSteps = 10;
-
layerName :String
-
Layer to be added to upon instantiation.
- Inherited From:
- Default Value:
- Source:
-
-
Another entity that this entity is linked to.
- Inherited From:
- Default Value:
- Source:
-
<readonly> managed :Boolean
-
Whether entity is currently being managed by ig.GameExtended#playerManager.
- Inherited From:
- Default Value:
- Source:
-
maxVel :Vector2|Object
-
Max velocity of entity
- Inherited From:
- Source:
- See:
-
-
maxVelClimbing :Vector2
-
Max velocity while climbing.
- Inherited From:
- Source:
- See:
-
-
maxVelGrounded :Vector2
-
Max velocity while on ground.
- Inherited From:
- Source:
- See:
-
-
maxVelUngrounded :Vector2
-
Max velocity while in air.
- Inherited From:
- Source:
- See:
-
-
mimicLevel :Number
-
How high of a mimic power is needed to mimic this character's abilities.
- Inherited From:
- Default Value:
- Source:
- See:
-
-
minBounceVelocity :Number
-
Minimum velocity to bounce.
- Inherited From:
- Source:
- See:
-
-
<readonly> movedTo :Boolean
-
Whether entity has moved to currently moving to entity.
- Inherited From:
- Default Value:
- Source:
-
moveToPredatorSettings :Object
-
Settings for moving to predator. For options, see ig.Character#moveTo.
- Source:
-
moveToPreySettings :Object
-
Settings for moving to prey. For options, see ig.Character#moveTo.
- Source:
-
moveToTetherSettings :Object
-
Settings for moving to tether. For options, see ig.Character#moveTo.
- Source:
-
<readonly> moveToUnsafe :Boolean
-
Whether character tried to move but stopped because movement was unsafe.
Tip: this is only set while pathfinding!
- Inherited From:
- Default Value:
- Source:
-
moveToWanderSettings :Object
-
Settings for random move. For options, see ig.Character#moveTo.
- Source:
-
<readonly> moving :Boolean
-
Whether entity is moving.
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingFrom :Boolean
-
Whether character is moving from another entity.
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingTo :ig.EntityExtended|Vector2|Object
-
Whether entity is moving to another entity.
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingToOnce :Boolean
-
Whether entity should move to another entity and stop moving.
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingToTweening :Boolean
-
Whether entity is tweening to another entity.
IMPORTANT: this is automatically disabled with dynamic entities!
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingToTweenPct :Number
-
Percent progress of tweening to another entity.
- Inherited From:
- Source:
-
<readonly> movingX :Boolean
-
Whether entity is moving horizontally.
- Inherited From:
- Default Value:
- Source:
-
<readonly> movingY :Boolean
-
Whether entity is moving vertically.
- Inherited From:
- Default Value:
- Source:
-
needsLineOfSightPredator :Boolean
-
Whether needs line of sight for predator.
- Source:
- See:
-
-
needsLineOfSightPrey :Boolean
-
Whether needs line of sight for prey.
- Source:
- See:
-
-
needsNewPath :Boolean
-
Whether character needs new path for pathfinding.
- Inherited From:
- Default Value:
- Source:
-
needsRebuild :Boolean
-
Whether entity needs to be rebuilt on next refresh.
IMPORTANT: it is usually a bad idea to set this to false initially!
- Inherited From:
- Default Value:
- Source:
-
needsVertices :Boolean
-
Whether to calculate vertices on change.
- Inherited From:
- Source:
- See:
-
-
offset :Vector2|Object
-
Character base offset.
- Inherited From:
- Source:
- See:
-
-
-
Signal dispatched when entity added to game.
- created on init.
- Inherited From:
- Source:
-
oneWay :Boolean
-
Whether entity is one way
- Inherited From:
- Default Value:
- Source:
-
oneWayFacing :Vector2
-
Direction from which entity will collide with another entity.
- Inherited From:
- Default Value:
- Source:
Example
// direction should be a 2d vector with a length of 1
// i.e. this is invalid
entity.oneWayFacing = { x: 0, y: 0 };
// while either of the following is okay
entity.oneWayFacing = { x: 1, y: 0 };
entity.oneWayFacing = ig.utilsvector2.vector( 1, 0 );
// to block from the left
entity.oneWayFacing = { x: -1, y: 0 };
// to block from the right
entity.oneWayFacing = { x: 1, y: 0 };
// to block from the top
entity.oneWayFacing = { x: 0, y: -1 };
// to block from the bottom
entity.oneWayFacing = { x: 0, y: 1 };
-
-
Signal dispatched when entity completes moving to another entity.
- created on init.
- Inherited From:
- Source:
-
-
Signal dispatched when entity is refreshed.
- created on init.
- Inherited From:
- Source:
-
-
Signal dispatched when entity removed from game.
- created on init.
- Inherited From:
- Source:
-
opaque :Boolean
-
Whether entity casts a shadow from lights.
- Inherited From:
- Source:
-
opaqueFromVertices :Boolean
-
Whether opaque vertices should use vertices when present.
IMPORTANT: when true, this overrides ig.EntityExtended#initOpaqueVertices, and ig.EntityExtended#getOpaqueVertices.
- Inherited From:
- Source:
- See:
-
-
opaqueOffset :Object
-
Size to offset from entity bounds for casting shadows when ig.EntityExtended#opaque.
Tip: to set opaque offsets per animation, use ig.AnimationExtended#opaqueOffset
- Inherited From:
- Source:
- See:
-
Example
// by default, shadow casting uses
// entity's opaque offsets
entity.opaqueOffset = {
left: 0,
right: 0,
top: 0,
bottom: 0
};
// unless the entity's current animation
// has its own opaque offsets
entity.currentAnim.opaqueOffset = {
left: 0,
right: 0,
top: 0,
bottom: 0
};
// opaque offsets can also be done per tile
entity.currentAnim.opaqueOffset = {
tiles: {
1: {
left: 0,
right: 0,
top: 0,
bottom: 0
},
2: {...}
}
};
-
opaqueVertices :Array
-
List of vertices in world space for shadow casting.
- recalculated when casting shadows by ig.EntityExtended#getOpaqueVertices
- Inherited From:
- Source:
-
-
Currently overriding animation.
- if present, this displays instead of ig.EntityExtended#currentAnim
- Inherited From:
- Default Value:
- Source:
-
path :Array
-
Path for pathfinding.
- Inherited From:
- Source:
- See:
-
-
pathfindingDelay :Number
-
Delay in seconds between pathfinding.
- Inherited From:
- Source:
- See:
-
-
pathfindingSimpleDelay :Number
-
Delay in seconds between pathfinding when following a path.
- Inherited From:
- Source:
- See:
-
-
pathfindingUpdateDelay :Number
-
Delay in seconds between pathfinding when following a path.
- Inherited From:
- Source:
- See:
-
-
pathingTimer :ig.Timer
-
Pathing update timer.
- created on first pathfind
- Inherited From:
- Source:
-
<readonly> paused :Boolean
-
Whether entity is paused.
- Inherited From:
- Default Value:
- Source:
-
-
Creature is dynamic.
- Default Value:
- Source:
-
persistent :Boolean
-
Whether entity should remain across levels.
Tip: an entity will only be moved from one level to another if an entity is found with a matching name!
IMPORTANT: the game will keep the first of each uniquely named persistent entity it encounters and merge the editor position and settings of any others with the same name as it encounters them.
- Inherited From:
- Default Value:
- Source:
-
pos :Vector2|Object
-
Base position.
- Inherited From:
- Source:
-
<readonly> posDraw :Vector2|Object
-
Drawn position.
- Inherited From:
- Source:
-
-
Target predator entity.
- Default Value:
- Source:
-
-
Entity class that this creature is prey for, i.e. creature should run away from them.
- priority 2 in finding predator, overrides group and type, overriden by name.
- Default Value:
- Source:
-
predatorFromDamage :Boolean
-
Whether creature sets predator to anything that damages it below flee threshold.
- Source:
- See:
-
-
predatorGroup :Bitflag
-
Groups that this creature is prey for, i.e. creature should run away from them.
- priority 4 in finding predator, overrides none.
- Source:
- See:
-
-
predatorName :String
-
Name of unique entity that this creature is prey for, i.e. creature should run away from them.
- priority 1 in finding predator, overrides group, type, and class.
- Source:
-
-
Entity type that this creature is prey for, i.e. creature should run away from them.
- priority 3 in finding predator, overrides group, overriden by name and class.
- Source:
-
-
Target prey entity.
- Default Value:
- Source:
-
-
Entity class that this creature will prey on, i.e. creature will attack them.
- priority 2 in finding prey, overrides type and group but overriden by name.
- Default Value:
- Source:
-
preyGroup :Bitflag
-
Groups that this creature will prey on, i.e. creature will attack them.
- priority 4 in finding prey, overrides none.
- Source:
- See:
-
-
preyName :String
-
Name of unique entity that this creature will prey on, i.e. creature will attack them.
- priority 1 in finding prey, overrides type, group, and class.
- Source:
-
-
Entity type that this creature will prey on, i.e. creature will attack them.
- priority 3 in finding predator, overrides group, overriden by name and class.
- Source:
-
rangeInteractableX :Number
-
Horizontal range at which this entity can be interacted with.
- a range of 0 is considered infinite
- abilities compare this to their own range and use the higher of the two
IMPORTANT: only relevant if entity type includes ig.EntityExtended.TYPE.INTERACTIVE.
- Inherited From:
- Default Value:
- Source:
-
rangeInteractableY :Number
-
Vertical range at which this entity can be interacted with.
- a range of 0 is considered infinite
- abilities compare this to their own range and use the higher of the two
IMPORTANT: only relevant if entity type includes ig.EntityExtended.TYPE.INTERACTIVE.
- Inherited From:
- Default Value:
- Source:
-
reactionDelay :Number
-
Distance at which creature reacts to other creatures in ig.Creature#preyGroup and ig.Creature#predatorGroup.
- Source:
- See:
-
-
reactionDistance :Number
-
Distance at which creature reacts to other creatures in ig.Creature#preyGroup and ig.Creature#predatorGroup.
Tip: for best results, reaction distance should be <= pathfinding distance!
- Source:
- See:
-
-
<readonly> reactionTimer :ig.Timer
-
Timer for reaction ticks.
- created on init
- Source:
-
regen :Boolean
-
Whether character regenerates stats.
- Inherited From:
- Default Value:
- Source:
-
regenAsPctEnergy :Boolean
-
Whether to treat energy regen as a percentage of max.
- Inherited From:
- Default Value:
- Source:
-
regenAsPctHealth :Boolean
-
Whether to treat health regen as a percentage of max.
- Inherited From:
- Default Value:
- Source:
-
regenDelay :Number
-
Time in seconds between regeneration ticks.
- Inherited From:
- Default Value:
- Source:
-
regenEnergy :Boolean
-
Whether character can regenerate the energy statistic.
- use to block regeneration dynamically
- Inherited From:
- Default Value:
- Source:
-
regenHealth :Boolean
-
Whether character can regenerate the health statistic.
- use to block regeneration dynamically
- Inherited From:
- Default Value:
- Source:
-
regenRateEnergy :Number
-
Amount of energy to regenerate per tick.
- Inherited From:
- Source:
- See:
-
-
regenRateHealth :Number
-
Amount of health to regenerate per tick.
- Inherited From:
- Source:
- See:
-
-
regenTimer :ig.Timer
-
Timer for regeneration ticks.
- created on init
- Inherited From:
- Default Value:
- Source:
-
resetState :Object
-
Last recorded state taken during ig.EntityExtended#recordResetState.
- automatically updated first time entity added to game world
- reset state records only a limited set of properties
- this can be useful for checkpoints, respawning, etc
- Inherited From:
- Source:
-
scale :Number
-
Scale that overrides system scale when ig.EntityExtended#ignoreSystemScale is true.
- Inherited From:
- Default Value:
- Source:
-
scaleMax :Number
-
Maximum value of ig.EntityExtended#scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_MAX
- Source:
-
scaleMin :Number
-
Minimum value of ig.EntityExtended#scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_MIN
- Source:
-
<readonly> scaleMod :Number
-
Modifier for when ig.EntityExtended#scale != ig.system.scale.
- Inherited From:
- Default Value:
- Source:
-
scaleOfSystemScale :Number
-
Scale of system scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_OF_SYSTEM_SCALE
- Source:
-
size :Vector2|Object
-
Character base size should be effective size accounting for offset.
- Inherited From:
- Source:
- See:
-
- ig.CONFIG.CHARACTER.SIZE_EFFECTIVE_X
- ig.CONFIG.CHARACTER.SIZE_EFFECTIVE_Y
-
<readonly> sizeDraw :Vector2|Object
-
Drawn size of entity, including size, offsets, etc.
- Inherited From:
- Source:
-
slope :Object
-
Whether entity is on a slope, and if so, slope properties.
- Inherited From:
- Source:
-
slopeSpeedMod :Number
-
Speed multiplier on slopes
- Inherited From:
- Source:
- See:
-
-
slopeStanding :Vector2
-
Slope angle range that entity can stand on.
- Inherited From:
- Source:
- See:
-
-
slopeSticking
-
- Inherited From:
- Source:
- See:
-
- ig.CONFIG.CHARACTER.SLOPE_STICKING
-
speed :Vector2
-
Movement speed to be applied to acceleration.
- Inherited From:
- Source:
- See:
-
-
standing :Boolean
-
Whether entity is standing.
- Inherited From:
- Source:
- See:
-
-
<readonly> stuck :Boolean
-
Whether character thinks it may be stuck while following a path.
- Inherited From:
- Default Value:
- Source:
-
stuckDelay :Number
-
Delay in seconds, after first becoming stuck, when character will throw path away.
- Inherited From:
- Source:
- See:
-
-
stuckTimer :ig.Timer
-
Stuck delay timer.
- created on first pathfind
- Inherited From:
- Source:
-
targetable
-
- Inherited From:
- Default Value:
- Source:
-
temporaryInvulnerabilityAlpha :Number
-
Temporary invulnerability pulse alpha.
- Inherited From:
- Default Value:
- Source:
-
temporaryInvulnerabilityPulses :Number
-
Number of times to pulse alpha while temporarily invulnerable.
- Inherited From:
- Default Value:
- Source:
-
tetherDistance :Number
-
Distance creature can move around its tether.
Tip: a spawned creature will use its spawner as a tether, unless ig.Creature#tetherName is set and matches a valid entity in the game.
- Source:
- See:
-
Example
// a creature can have a tether by:
// 1. it was spawned by a spawner
// 2. it has a tether name that matches a entity
// otherwise, tethering will be skipped
// when tether distance is <= 0
// a creature can go as far as it wants
myCreature.tetherDistance = 0;
// when tether distance is > 0
// a creature will only go up to that distance
myCreature.tetherDistance = 100;
// unless it can break its tether
// to follow prey or flee from a predator
myCreature.canBreakTether = true;
-
<readonly> tethering :Boolean
-
Whether creature is tethering, i.e. returning back to its tether.
- Default Value:
- Source:
-
tetherName :String
-
Name of tether entity.
- Source:
-
tetherToSpawner :Boolean
-
Try to use spawner as tether.
- Source:
- See:
-
-
textured :Boolean
-
Whether animations should be automatically textured across entity when added to entity.
- textures can be animated, but be careful about adding high amounts of frames
Tip: this is best applied to resizable entities.
- Inherited From:
- Default Value:
- Source:
-
<readonly> tweens :Object
-
All tweens affecting this entity that were initiated by ig.EntityExtended#tween.
- these tweens are automatically deleted when complete
- Inherited From:
- Source:
-
type :Bitflag|Number
-
Entity type, expanded for more flexibility and specificity.
IMPORTANT: for an entity to avoid being ignored in checks, it must either collide, checkAgainst, or have a type!
- Inherited From:
- Default Value:
- Source:
- See:
-
-
<readonly> ungroundedFor :Number
-
Duration since character was grounded.
- Inherited From:
- Default Value:
- Source:
-
ungroundedForAndFallingThreshold :Number
-
Duration after character leaves ground to start playing fall animation.
- Inherited From:
- Source:
- See:
-
-
ungroundedForThreshold :Number
-
Duration after character leaves ground during which they can still jump.
- this is intended to help players with slower reaction time
- this does not allow another jump while jumping
- Inherited From:
- Source:
- See:
-
-
vertices :Array
-
List of vertices based on bounds, relative to entity.
- not calculated by default for performance reasons
- to manually enable, use ig.EntityExtended#needsVertices
- Inherited From:
- Source:
-
verticesWorld :Array
-
List of vertices based on bounds, relative to world space.
- not calculated by default for performance reasons
- to manually enable, use ig.EntityExtended#needsVertices
- Inherited From:
- Source:
-
<readonly> visible :Boolean
-
Whether entity is visible in screen.
- Inherited From:
- Default Value:
- Source:
-
<readonly> wanderDirection :Vector2|Object
-
Direction of wander movement.
- Source:
-
<readonly> wandering :Boolean
-
Whether creature is currently wandering.
- Default Value:
- Source:
-
<readonly> wanderPos :Vector2|Object
-
Target position of random movement.
- Source:
-
wanderSwitchChance :Number
-
Chance as a percent between 0 and 1 that direction will switch while wandering.
Tip: setting this above 0.005 will cause creature to switch direction often and this can look rather stupid!
- Source:
- See:
-
-
wanderSwitchChanceStopped :Number
-
Chance as a percent between 0 and 1 that direction will switch while not wandering.
Tip: setting this above 0.015 will cause creature to never really stop moving.
- Source:
- See:
-
-
<readonly> wasChecking :Boolean
-
Whether entity was checking against another entity matching ig.Entity#checkAgainst flag.
- Inherited From:
- Default Value:
- Source:
-
<readonly> withinClimbables :Boolean
-
Whether character is intersecting a climbable entity.
- Inherited From:
- Default Value:
- Source:
-
<readonly> withinClimbablesAbove :Boolean
-
Whether character is intersecting a climbable entity above its feet (i.e. inside body).
- Inherited From:
- Default Value:
- Source:
-
<readonly> withinOneWay :Boolean
-
Whether character is intersecting a one-way entity.
- Inherited From:
- Default Value:
- Source:
-
<readonly> withinStairs :Boolean
-
Whether character is intersecting a climbable stairs entity.
- Inherited From:
- Default Value:
- Source: