In OpenBOR, an entity is any interactive game world object. Players, enemies, obstacles, are all entities. Placing an entity into gameplay is called “spawning”. To remove entities, we kill them. Entities typically spawn into play from a subset of the following:
- Level Spawns – Automatic spawns conducted as a result of various conditions. (i.e. players joining, scrolling to a given position, etc.).
- Sub entities – Spawns generally due to native actions by a parent entity. These are usually projectiles, NPC spawns, or simple effects.
- Script spawns – Spawns manually brought into play by script. Scrippt spawns offer full control and are sometimes used for more complex projectiles, particle effects, or NPCs too complex to handle with native commands.
Entity vs. Model
By careful not to confuse an entity with a model. Models are loaded templates used to build an entity. Entities are the objects that are created for game interaction.
Contents
Script
As entities are the primary form of interactive object, they posses a vast number of values and possible configurations (hitpoints, position, current animation, etc.). Under normal circumstances, most of these properties are invisible and handled automatically with default behaviors. For advanced creators, entity properties are accessible through the get_entity_property()
and set_entity_property()
functions.
mixed x = get_entity_property(void <entity handle>, int <identifier>);
mixed x = <value>;
set_entity_property(void <entity handle>, int <identifier>, x);
This example adds 5 hit points to an entity by getting and setting the hp property.
void acting_entity = <entity>
int hp_current = get_entity_property(acting_entity, openborconstant("ENTITY_PROPERTY_HP"));
hp_current += 5;
set_entity_property(acting_entity, openborconstant("ENTITY_PROPERTY_HP"), hp_current);
Property List
- Constant: The property’s constant identifier. For example,
openborconstant("ENTITY_PROPERTY_AI_DISABLE")
. - Type: The property value’s variable type.
- Description: A short description of what the property is and does.
Constant | Type | Description |
---|---|---|
ENTITY_PROPERTY_AI_DISABLE | Binary | While TRUE all automated behavior logic exits without taking action. Remember this affects the behavior of player entities as well. |
ENTITY_PROPERTY_AI_TARGET_ENTITY | Pointer | Entity will ignore its default targeting routine and instead target any valid entity supplied here. This value is never modified by the engine – it is specifically to allow custom targeting, way point setting, and so on. |
ENTITY_PROPERTY_ALTERNATE_IDLE | Integer | If the entity has multiple idle animations, populating this property will override their range settings and force a specific idle to play. Unlike most properties, alternate_idle is NOT zero indexed: 1 = Idle 1, 2 = Idle 2, … |
ENTITY_PROPERTY_ALTERNATE_WALK | Integer | Same as alternate_idle, but affects walking animations. |
ENTITY_PROPERTY_ANIMATION | Pointer | Pointer to the entity’s current animation. You can use this pointer to access the animation’s properties. |
ENTITY_PROPERTY_ANIMATION_FRAME | Integer | The current animation frame entity is displaying. |
ENTITY_PROPERTY_ANIMATION_ID | Integer | ID constant of the current animation. A few examples of animation ID constants include: * openborconstant("ANI_IDLE") * openborconstant("ANI_SPECIAL") * openborconstant("ANI_JUMP") * … Note: This property is writable, but unlike legacy changeentityproperty() function, setting a new animation ID does not cause the entity to play a new animation. To play another animation use executeanimation() or performattack(). |
ENTITY_PROPERTY_ANIMATION_ID_PREVIOUS | Integer | ID constant of the previous animation. Note that when you change the animation ID property directly you are bypassing the engine’s normal animation switching routine, meaning this property won’t be updated unless you do it yourself. |
ENTITY_PROPERTY_ANIMATION_STATE | Integer | If entity’s current animation is in progress, and in which direction. This flag is used by many aspects of the engine logic to determine when animations are finished and thus when certain actions are complete and or new animations can be assigned. * openborconstant{"ANIMATING_FORWARD") – Animation is playing normally. * openborconstant{"ANIMATING_NONE") – Animation is not playing, or is complete (see animation_time).* openborconstant{"ANIMATING_REVERSE") – Animation is playing frames in reverse order. |
ENTITY_PROPERTY_ANIMATION_TIME | Integer | Time when animation updates (i.e. when current frame expires). When elapsed time equals animation_time, the animation moves to its next frame. If the animation is already at its last frame and does not have a loop, the entity’s animating property is set to openborconstant{"ANIMATING_NONE") . The value assigned to animation_time is elapsed_time added to some other metric such as frame delay or an incoming attack’s pause property. |
ENTITY_PROPERTY_ARROW_STATE | Binary | When TRUE parrow displays over the entity. Has no effect if entity is not a player type. |
ENTITY_PROPERTY_ATTACK_ID_INCOMING | Pointer | Pointer to array of hit tracking variables. See Attack ID below. |
ENTITY_PROPERTY_ATTACK_ID_OUTGOING | Integer | See attack_id_incoming. |
ENTITY_PROPERTY_ATTACK_STATE | Integer | Flag used to determine if the entity is actively striking. * openborconstant("ATTACKING_ACTIVE") – Attacking. * openborconstant("ATTACKING_NONE") – Not attacking (disables attack boxes). * openborconstant("ATTACKING_PREPARED") – Not currently attacking, but an AI controlled entity has just selected an animation to attack with. |
ENTITY_PROPERTY_AUTOKILL | Integer | Entity kills itself immediately if specified conditions are met. Bit masked with following constants: * openborconstant("AUTOKILL_ANIMATION_COMPLETE") – Entity reaches end of current animation (assuming animation does not loop). Used mostly for hit flash and dust effects.* openborconstant("AUTOKILL_ATTACK_HIT") – Entity hits with an attack. By default most types of projectile use this to remove themselves on impact. * openborconstant("AUTOKILL_NONE") – No autokill. |
ENTITY_PROPERTY_BACK_HIT_DIRECTION | Integer | Temporary property used to control direction for back hits. Only used when the attack’s force direction setting is None (meaning determine direction by comparing position of attacker and recipient). * openborconstant("DIRECTION_LEFT") – Entity will be forced to face left. * openborconstant("DIRECTION_NONE") – One of the attacks direction force settings other than None is in use, and entity will follow that rule. * openborconstant("DIRECTION_RIGHT") – Entity will be forced to face right. |
ENTITY_PROPERTY_BIND | Pointer | Pointer to the entity’s Binding properties. |
ENTITY_PROPERTY_BLAST_STATE | Integer | Controls entity being “blasted” – as in, thrown or hit into other entities. * openborconstant("BLAST_ATTACK") – Active blast effect. If the entity has an attack box it will be active and hit other entities according to projectilehit model property.* openborconstant("BLAST_NONE") – No blast effect. * openborconstant("BLAST_TOSS") – Entity can land safely if it has a valid LAND animation. |
ENTITY_PROPERTY_BLINK | Binary | Used mainly for KO’d or invincible entities. Whenever this flag is TRUE, the entity will flash on and off. |
ENTITY_PROPERTY_BLOCK_STATE | Binary | If TRUE the entity is in a blocking state and will react accordingly when an attack hits. |
ENTITY_PROPERTY_BOSS | Binary | If TRUE, the entity is a boss. |
ENTITY_PROPERTY_CHARGE_STATE | Binary | If TRUE, the entity is actively charging energy and will gain energy according to its chargerate. Under normal circumstances, this flag is set TRUE when a player assumes the Charge animation and FALSE upon taking a hit, being KO’d, or releasing the charge command. |
ENTITY_PROPERTY_CHILD | Pointer | The entity spawned into play by summonframe. |
ENTITY_PROPERTY_COLORSET_DEFAULT | Integer | Color set index entity was spawned into play with. |
ENTITY_PROPERTY_COLORSET_DYING_HEALTH_1 | Integer | Health value {health1} that triggers dying effect. |
ENTITY_PROPERTY_COLORSET_DYING_HEALTH_2 | Integer | Health value {health2} that triggers accelerated dying effect. |
ENTITY_PROPERTY_COLORSET_DYING_INDEX_1 | Integer | Color set index from {remap1} in dying. |
ENTITY_PROPERTY_COLORSET_DYING_INDEX_2 | Integer | Color set index from {remap2} in dying. |
ENTITY_PROPERTY_COLORSET_TABLE | Pointer | Color table currently in use by entity. |
ENTITY_PROPERTY_COLORSET_TIME | Integer | Used by forcemap. When applied, value is set to a future point in time. Once elapsed time catches up, the entity is reverted to its default color set. |
ENTITY_PROPERTY_COMBO_STEP | Pointer | Pointer to array OpenBOR uses to track what step the entity is in during atchain and grab attacks. |
ENTITY_PROPERTY_COMBO_TIME | Integer | Time when current atchain expires and is reset. Each time an attack hits, this value is populated with elapsed time + combodelay. When elapsed time catches up, the combo is reset. |
ENTITY_PROPERTY_COMMAND_TIME | Integer | Time when current command sequence expires. Used for grace period between player inputs for special moves. Each time a player input is detected, this value is populated with elapsed time + a calculated value of about 0.5 seconds real time. If elapsed time catches up before the next input, the sequence is reset and next input is treated as part of a new sequence. |
ENTITY_PROPERTY_DAMAGE_ON_LANDING | Pointer | Pointer to the entity’s Damage On Landing properties. |
ENTITY_PROPERTY_DEATH_STATE | Integer | Entity’s death state. |
ENTITY_PROPERTY_DEFENSE_COLLECTION | Pointer | Entity’s collection of defenses (resistance or vulnerability to certain attack types). |
ENTITY_PROPERTY_DESTINATION_X | Float | Horizontal position target. When actively moving (i.e. walking) the entity heads toward this position. AI uses this in conjunction with waypoints for path finding, seeking out items, chasing hostile targets, and so on. |
ENTITY_PROPERTY_DESTINATION_Z | Float | Lateral position target. Same logic as destination_x. |
ENTITY_PROPERTY_DIE_ON_LANDING | Binary | Set TRUE when entity takes sufficient damage from landing to drop its hit points to 0. This is used by downstream logic to confirm the entity will be KO’d, at which point the value is set FALSE. |
ENTITY_PROPERTY_DRAWMETHOD | Pointer | Entity’s Drawmethod properties. |
ENTITY_PROPERTY_DROP | Binary | Set TRUE when entity is knocked down by an attack, and FALSE when it rises or rise attacks. |
ENTITY_PROPERTY_DUCK_STATE | Integer | * openborconstant("DUCK_ACTIVE") – In ducking state. * openborconstant("DUCK_NONE") – Not ducking. * openborconstant("DUCK_PREPARED") – In a ducking state, but has not fully transitioned to duck position (i.e. still playing DUCKING animation if it has one). * openborconstant("DUCK_RISE") – In a ducking state, but is transitioning to a normal stance (i.e. still playing DUCKRISE animation if it has one). |
ENTITY_PROPERTY_ENTVAR_COLLECTION | Pointer | Pointer to collection of the entity’s variables. |
ENTITY_PROPERTY_ESCAPE_COUNT | Integer | Number of consecutive hits taken during one hitstun period. Resets to 0 when entity is knocked down or no longer in hitstun. When it exceeds model data escape hits property, AI controlled entities will perform Special 2. |
ENTITY_PROPERTY_EXISTS | Binary | Set TRUE when entity is spawned, FALSE immediately before it is removed from play. Many logic cycles in OpenBOR are run asynchronously, so this is used a lot to make sure another cycle hasn’t destroyed the entity before attempting to perform some operation on it. |
ENTITY_PROPERTY_EXPLODE | Integer | Controls bomb projectiles. Note if the entity is not using bomb AI, this property is never evaluated and does nothing: * openborconstant{"EXPLODE_DETONATE") – Entity “detonates”. It will take the following actions: Plays ATTACK2 if available. Otherwise ATTACK1 plays. Plays the diesound. Cannot be hit with attacks. Is immune to damage by any normal means. When either explode animation is complete, entity is killed. * openborconstant{"EXPLODE_NONE") – No bomb behavior. * openborconstant{"EXPLODE_PREPARED") – Entity will enter detonate status if it hits with or is hit by an attack. |
ENTITY_PROPERTY_FACTION | Pointer | Pointer to entity’s faction property data. |
ENTITY_PROPERTY_FALL_STATE | Binary | Set TRUE when entity is is knocked down by an attack or thrown, and FALSE when it lands (reaches base altitude). |
ENTITY_PROPERTY_FREEZE_STATE | Binary | If TRUE, the entity is frozen. |
ENTITY_PROPERTY_FREEZE_TIME | Integer | Time when current freeze effect expires. When entity is hit with a freeze attack, its freeze_time is populated with elapsed time + the attack’s freeze time. When elapsed time catches up, the freeze effect ends. |
ENTITY_PROPERTY_FUNCTION_TAKE_ACTION | Pointer | As the name implies, this internal function executes various actions and their associated logic. Unlike other function pointers which tend to stay the same throughout an entity’s existence, function_take_action is swapped regularly depending on the action functionality needed. At any point the entity make take an action to lie on the ground, perform an attack, or nothing at all, or one of several others all with their own unique logic that may turn lead to other actions. See function_think for general details about function pointers. |
ENTITY_PROPERTY_FUNCTION_TAKE_DAMAGE | Pointer | Internal function the entity runs to apply incoming damage to itself and react accordingly (go into a pain, fall, die, etc.). See function_think for general details about function pointers. |
ENTITY_PROPERTY_FUNCTION_THINK | Pointer | Internal function the entity runs each time it thinks. At the moment there’s not much you can do with this other than replace it with the pointer from another entity’s think property. It goes without saying that messing with internal functions the engine is built on could cause some wild behaviors, or simply crash outright. Don’t be afraid to experiment, but do be ready for unpredictable results. Methods for obtaining the list of internal function pointers are in progress. |
ENTITY_PROPERTY_FUNCTION_TRY_MOVE | Pointer | Runs when the entity wishes to move (or is commanded to by player), and handles logic to do so (movement speed, falling into pits, blocked by walls or boundaries, and so on). See function_think for general details about function pointers. |
ENTITY_PROPERTY_GET_STATE | Binary | If TRUE, entity is in process of picking up an item. Set FALSE when the GET animation completes. |
ENTITY_PROPERTY_GRAB_TARGET | Pointer | When grabbing, grab_target is the entity that is grabbed. Used in conjunction with link. |
ENTITY_PROPERTY_GRAB_WALK_STATE | Binary | If TRUE, entity walking while grappling another entity. |
ENTITY_PROPERTY_GUARD_POINTS | Integer | Current guard points. |
ENTITY_PROPERTY_GUARD_TIME | Integer | Time of next guard points recovery tick. Each time entity’s guard points recovers, this is set to elapsed time + GAME_TIME (200). When elapsed time catches up, the entity recovers a number of guard points equal to its guard rate, or guard rate * 0.5 if the entity is currently blocking. |
ENTITY_PROPERTY_HP | Integer | Current hitpoints (health). |
ENTITY_PROPERTY_HP_OLD | Integer | Used to calculate the life bar display. Whenever hp_old and hp have different values, hp_old is incremented or decremented 1 per engine update until they match again. This is what gives the life bar its smooth scrolling effect when an entity loses or gains hp. |
ENTITY_PROPERTY_IDLE_STATE | Binary | When TRUE, the entity is idle. Think of it as another way to say the entity isn’t doing anything else and is ready to take an action. |
ENTITY_PROPERTY_IN_PAIN | Integer | Used for both hit stun and and block stun. Bitwise with following constants: * openborconstant("IN_PAIN_BLOCK") – In block stun.* openborconstant("IN_PAIN_HIT") – In normal hit stun.* openborconstant("IN_PAIN_NONE") – No hit stun state.When in hitstun, the entity is unable to take normal actions, though it usually can execute its breakout special. |
ENTITY_PROPERTY_IN_PAIN_BACK | Binary | Set TRUE when entity is hit from behind. Triggers back version of pain, knockdown, rise, or death animations. |
ENTITY_PROPERTY_INVINCIBLE_STATE | Integer | Attack invulnerability state. Bit masked with following constants. * openborconstant("INVINCIBLE_INTANGIBLE") – The entity cannot be hit by attacks or grabbed. Whenever invincibility is mentioned in the manual, this is the state being applied. * openborconstant("INVINCIBLE_HP_MINIMUM") – Entity cannot be reduced below 1 hit point. * openborconstant("INVINCIBLE_NONE") – No invincibility. * openborconstant("INVINCIBLE_HP_NULL") – Attacks do not reduce the entity’s hit points. Attacks that would increase hit points still take effect. * openborconstant("INVINCIBLE_HP_RESET") – Whenever entity would be reduced below 1 hit point from an attack, its hit points are reset to maximum instead. In the case of hit point damage, invincibility is applied after defenses are calculated. Note that invincibility only applies to fighting damage (attacks from other entities, traps, and items). Special types (falling into pits, time over, lifespan expires, etc.) affect the entity normally. |
ENTITY_PROPERTY_INVINCIBLE_TIME | Integer | When invincibility expires. When elapsed time exceeds this value, invincibility is set to openborconstant("INVINCIBLE_NONE") . |
ENTITY_PROPERTY_ITEM_DATA | Pointer | Pointer to list of properties that will be copied to an item when it is dropped. The item will subsequently apply those properties to to an entity that picks it up. |
ENTITY_PROPERTY_JUMP_ANIMATION_ID | Integer | When an entity decides to jump (or is commanded to by player), a jumping animation ID is assigned here based on the situation (vertical jump, running jump, etc.). Once the jump begins, the animation will play. |
ENTITY_PROPERTY_JUMP_STATE | Binary | When TRUE, the entity is in a jumping state. Controls and AI will behave accordingly (i.e. Attack button triggers jump attacks, hostile entities in range will use Upper if they have it, etc.). |
ENTITY_PROPERTY_JUMP_VELOCITY_X | Float | When an entity decides to jump (or is commanded to by player), a horizontal velocity is assigned here based on the entity’s movement and jump settings. Once the jump begins, the entity assumes this velocity. |
ENTITY_PROPERTY_JUMP_VELOCITY_Y | Float | Same as jump_velocity_x, but for vertical velocity. |
ENTITY_PROPERTY_JUMP_VELOCITY_Z | Float | Same as jump_velocity_x, but for lateral velocity. |
ENTITY_PROPERTY_KNOCKDOWN_COUNT | Integer | Current knockdown_count. Reduces by attack’s knockdown force on hit. If knockdown count is reduced to or already 0, the entity is knocked down. Resets to maximum under the following conditions: An attack hits when knockdown_time is less than elapsed_time. In this case, knockdown_count resets first, then the attack’s knockdown power (if any) is applied immediately after. An attack knocks the entity down, even it it normally wouldn’t (such as when an entity is knocked out of the air). |
ENTITY_PROPERTY_KNOCKDOWN_TIME | Integer | When to expire knockdown_count. Each time entity is hit with an attack, knockdown_time is populated with elapsed_time + GAME_SPEED. See knockdown_count for other details. |
ENTITY_PROPERTY_LAST_DAMAGE_TYPE | Integer | Last attack type that caused damage to the entity. This is used to determine what falls, rises, rise attacks etc., the entity will perform. |
ENTITY_PROPERTY_LAST_HIT | Pointer | Last entity this entity hit with an attack. Mainly used by the hit one attack property to identify the first entity an attack hit and thus ignore any others. |
ENTITY_PROPERTY_LIFESPAN | Integer | Time remaining before entity dies automatically. If lifespan is any value other than openborconstant("LIFESPAN_DEFAULT") , it will decrement 1 each engine update. Once lifespan falls below 0, the entity immediately takes damage of type openborconstant("ATK_LIFESPAN") equal to its remaining hit points. If the entity is a special type without a take_damage function, it is killed instantly instead. |
ENTITY_PROPERTY_LINK | Pointer | When one entity grabs another, both entities link properties are populated with the opposing entity (i.e. the grabbing entity’s link property will be the grabbed entity’s pointer and vise versa). |
ENTITY_PROPERTY_MODEL | Pointer | Current model. |
ENTITY_PROPERTY_MODEL_DATA | Pointer | Copied model data. When an entity is spawned, a copy of the base model’s properties is created, given some one time adjustments if needed, and the pointer to them is placed here. It then serves as a repository for maximum caps or values that don’t have an associated entity property at all because they are static after the initial spawn. One example is HP. There is no such thing as a maximum HP property. Instead the entity’s HP property is the current HP value, and model data HP property is the maximum. Note that many of the properties accessible through the legacy getentityproperty() and changeentityproperty() functions are actually the model data properties. If you are looking for a “missing” property, you will probably find it here. |
ENTITY_PROPERTY_MODEL_DEFAULT | Pointer | Default model. |
ENTITY_PROPERTY_MOVE_TIME | Integer | If this value exceeds elapsed time, movement along the horizontal and lateral axis is ignored. Used by attack pause to momentarily stop entities from moving when an attack hits. This is done by adding the incoming attack’s pause value and elapsed time to entity’s move_time when an attack hits. See toss_time for a similar effect on gravity. |
ENTITY_PROPERTY_MOVE_X | Float | Set when an animation frame has a move command. The entity will reposition move_x pixels horizontally each animation frame. |
ENTITY_PROPERTY_MOVE_Z | Float | Set when an animation frame has a movez command. The entity will reposition move_z pixels laterally each animation frame. |
ENTITY_PROPERTY_MP | Integer | Current magic points (special energy). |
ENTITY_PROPERTY_MP_CHARGE_TIME | Integer | Time of next MP adjustment tick when actively charging (Charge Animation). Each time entity’s MP adjusts while charging, this is set to elapsed time + (GAME_TIME (200) * 0.25). When elapsed time catches up, the MP is adjusted according to the model’s MP charge rate setting. |
ENTITY_PROPERTY_MP_OLD | Integer | Used to calculate the magic bar display. Same logic as hp_old. |
ENTITY_PROPERTY_MP_TIME | Integer | Time of next MP auto adjustment tick. Each time entity’s MP auto adjusts, this is set to elapsed time + GAME_TIME (200). When elapsed time catches up, the MP is adjusted according to whatever MP recovery settings are defined for the entity. |
ENTITY_PROPERTY_NAME | String | Current name. This is the alias (if any) given to an entity as it is spawned into levels. Otherwise it will be the entity’s default name. |
ENTITY_PROPERTY_NEXT_ATTACK_TIME | Integer | Used to insert a delay between chances to attack by the AI. Each time the AI evaluates its chance percentage to execute an attack, next_attack_time is populated with the entity’s model property attack throttle plus a small random number. When elapsed time catches up, the AI can can try its attack chance again. |
ENTITY_PROPERTY_NEXT_HIT_TIME | Integer | Controls invincibility to consecutive hits. When attacks hit, this value is populated with elapsed_time plus one of three additional values: Default: GAME_SPEED / 5 Attack has “fastattack” enabled: GAME_SPEED / 20. Attack has a valid next_hit_time property (not available with legacy attack box commands): The attack’s next_hit_time. Any subsequent attack collisions are ignored until elapsed_time catches up with next_hit_time. |
ENTITY_PROPERTY_NOGRAB | Integer | If TRUE, the entity is completely immune to the default grab system. |
ENTITY_PROPERTY_NOGRAB_DEFAULT | Integer | Default nograb value the entity spawned with. |
ENTITY_PROPERTY_OBSTRUCTED | Binary | If TRUE the entity is prevented from moving by a wall, obstacle, or platform. |
ENTITY_PROPERTY_OBSTRUCTION_OVERHEAD | Pointer | Platform entity currently blocking upward movement. |
ENTITY_PROPERTY_OFFENSE_COLLECTION | Pointer | Entity’s collection of offenses (increase or decrease damage output of certain attack types). |
ENTITY_PROPERTY_OPPONENT | Pointer | Last entity interacted with (hit or took hits from, a recent item picked up, etc.). By default, this is the entity that appears next to a player’s status in the HUD. |
ENTITY_PROPERTY_OWNER | Pointer | Used by projectile system to track who the projectile belongs to. The presence of an owner at all causes engine logic to treat an entity as a projectile, with the following caveats: All entities spawned with the various throw, shoot, and bomb commands, or any sub entity with SUBTYPE_ARROW will have their owner property are assigned to the entity that spawned them. Entities attack boxes cannot hit their owners. Entities with an owner are not knocked down when players spawn into a level. When entity hits with an attack, its owner is given credit for the hit and becomes the victim’s opponent. |
ENTITY_PROPERTY_PARENT | Pointer | For entities spawned with a sub entity command (spawn or summon), this is the entity that spawned them. |
ENTITY_PROPERTY_PATH_OBSTRUCTED_WAIT | Integer | When entity attempts to reach a target but something is in its way, a value of (elapsed_time modulo 2) is added to this property each engine update. Once the property value reaches 40 (or 20 for entities using chase AI), the entity begins a path finding routine to try and circumvent the obstruction. |
ENTITY_PROPERTY_PAUSE_TIME | Integer | Used to determine if an attack’s pause effect should be applied to the attacking entity as well. When an attack hits, the attacking entity’s pause_time is compared to elapsed time. If elapsed_time is greater, the attacking entity’s animation_time, move_time, think_time, and toss_time are populated with elapsed time plus the attack’s pause value, just as they always are on the receiving entity. Additionally, the attacker’s pause_time gets the same update. This logic allows a single attack to get a “fair” pause when it hits multiple targets. If the attack simply incurred cumulative pause on each hit, the pause effect could add up to ridiculous values that do not reflect in game events. By only adding pause effect when the previous pause is over, the attack is still continuously slowed down as long as it keeps hitting new targets, but only for the correct amount per hit. |
ENTITY_PROPERTY_PLATFORM_LAND | Pointer | Platform entity this entity has landed on. |
ENTITY_PROPERTY_PLAYER_INDEX | Integer | Player number controlling this entity. Remember variables are 0 indexed, so 0 = Player 1, 1 = Player 2, and so on. |
ENTITY_PROPERTY_POSITION_BASE | Float | The entity’s current “floor” position, where its Y (altitude) is considered 0. Normally 0, but may change when the entity is standing on walls, platforms, etc. |
ENTITY_PROPERTY_POSITION_BASE_ALTERNATE | Float | The entity’s temporary “floor” position, where its Y (altitude) is considered 0. Modified when movea is used. You probably won’t need this in most cases, base_default will suffice. |
ENTITY_PROPERTY_POSITION_DIRECTION | Integer | The entity’s directional facing. Openborconstant("DIRECTION_LEFT") – Facing left. Openborconstant("DIRECTION_RIGHT") – Facing right. |
ENTITY_PROPERTY_POSITION_X | Float | The entity’s current position along the horizontal axis. |
ENTITY_PROPERTY_POSITION_Y | Float | The entity’s current position along the vertical axis. |
ENTITY_PROPERTY_POSITION_Z | Float | The entity’s current position along the lateral axis. |
ENTITY_PROPERTY_PROJECTILE_PRIME | Integer | When this entity is spawned by any one of the engine engine’s projectile commands, projectile_prime will be populated with the combined values of the following constants. The values are configured so you may use bitwise logic to extract the relevant property value you may be looking for: Base controls what value will be assigned as the projectile’s base position. * openborconstant("PROJECTILE_PRIME_BASE_FLOOR") – Stage floor default (0). * openborconstant("PROJECTILE_PRIME_BASE_Y") – Same as the projectile’s starting Y position. Launch is the projectiles starting movement. * openborconstant("PROJECTILE_PRIME_LAUNCH_MOVING") – Projectile is launched with its speed setting. * openborconstant("PROJECTILE_PRIME_LAUNCH_STATIONARY") – Projectile does not move after spawn. Source is how the model to be spawned was selected. * openborconstant("PROJECTILE_PRIME_SOURCE_GLOBAL_KNIFE") – No model source set. Spawn by default model name “Knife” attempted and succeeded. * openborconstant("PROJECTILE_PRIME_SOURCE_GLOBAL_SHOT") – No model source set. Spawn by default model name “Knife” failed. Spawn by default model name “Shot” attempted and succeeded. * openborconstant("PROJECTILE_PRIME_SOURCE_GLOBAL_STAR") – No model source set. Spawn by default model name “Star” attempted and succeeded. * openborconstant("PROJECTILE_PRIME_SOURCE_MODEL_BOMB") – Model bomb property. * openborconstant("PROJECTILE_PRIME_SOURCE_MODEL_KNIFE") – Model knife property. * openborconstant("PROJECTILE_PRIME_SOURCE_MODEL_PSHOTNO") – Model property pshotno. openborconstant("PROJECTILE_PRIME_SOURCE_MODEL_PSHOTNO") – Model property star. * openborconstant("PROJECTILE_PRIME_SOURCE_PROJ_FLASH") – Projectile property flash. * openborconstant("PROJECTILE_PRIME_SOURCE_PROJ_KNIFE") – Projectile property knife or shot. * openborconstant("PROJECTILE_PRIME_SOURCE_PROJ_STAR") – Projectile property star. * openborconstant("PROJECTILE_PRIME_SOURCE_WEAPON_PROJECTILE") – Model was selected by the spawning entity collecting a weapon with the PROJECTILE subtype. |
ENTITY_PROPERTY_RECURSIVE_DAMAGE | Pointer | The head node of any recursive damage effects active on the entity. If NULL, the entity does not any active recursive effects. |
ENTITY_PROPERTY_RELEASE_TIME | Integer | Time when player controlled entity will let go of grab. While entity grabs an opponent and player is not holding back command, this value continuously updates to a calculated amount ahead of elapsed time (~one second of real time). If the player is holding back and elapsed time exceeds this value, the grabbed entity is released. |
ENTITY_PROPERTY_RISE_ATTACK_DELAY | Integer | Extra time before entity can perform a rise attack. This value is adjusted by an incoming attack’s staydown rise attack value. It is then combined with the entity’s rise time model property and elapsed time. The end result is then used to populate rise_attack_time. When elapsed time catches up, the entity can rise. |
ENTITY_PROPERTY_RISE_ATTACK_TIME | Integer | Works just like stall time, but rise_attack_time is specifically for rise attacks. |
ENTITY_PROPERTY_RISE_DELAY | Integer | Extra time before entity can rise from a knockdown. This value is adjusted by an incoming attack’s staydown rise value. It is then combined with the entity’s rise time model property and elapsed time. The end result is then used to populate stall_time. When elapsed time catches up, the entity can rise. |
ENTITY_PROPERTY_RISE_STATE | Integer | Status of rising or rise attacking. * openborconstant("RISING_ATTACK") – Performing a rise attack. * openborconstant("RISING_NONE") – Not rising. * openborconstant("RISING_RISE") – Rising normally. |
ENTITY_PROPERTY_RUN_STATE | Integer | If true, entity is running. |
ENTITY_PROPERTY_RUSH | Pointer | Pointer to entity’s rush combo properties. |
ENTITY_PROPERTY_SCRIPT_COLLECTION | Pointer | Pointer to entity’s collection of loaded scripts. |
ENTITY_PROPERTY_SEAL_ENERGY | Integer | Seal energy. If this value is 0+, the entity cannot perform specials with an equal or greater energy cost. |
ENTITY_PROPERTY_SEAL_TIME | Integer | Time when seal effect expires. When entity is hit with seal attack, this value is populated with elapsed time + the attack’s seal time. When elapsed time catches up, seal_energy resets to 0. |
ENTITY_PROPERTY_SHADOW_CONFIG_FLAGS | Integer | Shadow behavior. See Shadow Configuration. |
ENTITY_PROPERTY_SLEEP_TIME | Integer | Time when Sleep animation starts. When entity is not idle or already in sleep animation, sleep_time is continuously updated with elapsed_time plus the model’s sleep wait setting. If elapsed_time catches up while the entity is idle, it assumes the Sleep animation. |
ENTITY_PROPERTY_SORT_ID | Integer | Sorting order for drawing. Drawing order is determined by a combination of sort ID and position on the Z axis. Lower numbered items are drawn first, meaning that higher numbered items will appear over top of them. sort_id is normally adjusted automatically when needed. For instance, during a default grab, the grabbed entity’s sort_id is set to the grabbing entity’s sort_id – 1. |
ENTITY_PROPERTY_SPACE_OTHER | Pointer | When entities collide with each other, their respective space_other properties are populated with the opposing entity. Note: Entity Collision boxes are an unauthorized addition set for removal. Their functionality will be handled with advanced body box options. This property is not guaranteed to maintain backward compatibility. |
ENTITY_PROPERTY_SPAWN_TYPE | Integer | How entity was spawned into play. This is not related to the entity’s actual type, rather it is the method that was used to bring it into existence: * openborconstant("SPAWN_TYPE_UNDEFINED") – Direct command bypassing all of the known spawn methods. Almost certainly by a script. * openborconstant("SPAWN_TYPE_BIKER") – Bike rider when a biker entity is hit. * openborconstant("SPAWN_TYPE_CMD_SPAWN") – Parent entity animation Spawn command. * openborconstant("SPAWN_TYPE_CMD_SUMMON") – Parent entity animation animation Summon command. * openborconstant("SPAWN_TYPE_DUST_FALL") – Dust effect when parent entity lands from fall. * openborconstant("SPAWN_TYPE_DUST_JUMP") – Dust effect when parent entity jumps or triggers jumpframe. * openborconstant("SPAWN_TYPE_DUST_LAND") – Dust effect when parent entity lands from jump or triggers landframe. * openborconstant("SPAWN_TYPE_FLASH") – Flash effect on a hit. * openborconstant("SPAWN_TYPE_ITEM") – Spawned as an item drop from parent entity. * openborconstant("SPAWN_TYPE_LEVEL") – The default level building spawn command. * openborconstant("SPAWN_TYPE_PLAYER_MAIN") – The player’s selected fighter. * openborconstant("SPAWN_TYPE_PLAYER_SELECT") – The player selection menu entity. * openborconstant("SPAWN_TYPE_PROJECTILE_BOMB") – Thrown projectile, bomb style. * openborconstant("SPAWN_TYPE_PROJECTILE_NORMAL") – Thrown projectile, default style. * openborconstant("SPAWN_TYPE_PROJECTILE_STAR") – The star projectile command. * openborconstant("SPAWN_TYPE_STEAM") – Steam entity repeatedly spawned by parent steamer decoration entity. * openborconstant("SPAWN_TYPE_WEAPON") – Weapon entity given to a level spawn that may be dropped as an item. |
ENTITY_PROPERTY_SPEED_MULTIPLIER | Float | Usually has a value of 1 or 2. This is applied in conjunction with move_x or move_z along with velocity_x or velocity_z and engine update speed to produce a final pixel adjustment per update. |
ENTITY_PROPERTY_STALL_TIME | Integer | Used by virtually every AI function and many timed actions, such how long to wait before getting up from a fall. Some functions may have a unique verification, but generally stall time must be less than elapsed time for an action or function to complete. |
ENTITY_PROPERTY_THINK_TIME | Integer | Used by the main AI update routine (this controls certain actions for players as well). If elapsed time is greater than think_time, all AI is skipped. |
ENTITY_PROPERTY_TIMESTAMP | Integer | The elapsed time when entity was spawned. The engine’s update cycle for entities intentionally ignores entities with a timestamp equal to currently elapsed time. This ensures entities spawned in do not get their first update until the loop cycle is complete and starting again fresh. |
ENTITY_PROPERTY_TO_COST | Integer | When Special attack that only costs energy on successful hits is in use, this temporary flag acts as the control. Set TRUE when attack hits, FALSE after cost is deducted. |
ENTITY_PROPERTY_TOSS_TIME | Integer | Similar to move_time, and used for the same purpose (pauses when an attack hits). If this value exceeds elapsed time, the entity does not move along the vertical axis. |
ENTITY_PROPERTY_TURN_STATE | Binary | If TRUE the entity is turning around. |
ENTITY_PROPERTY_TURN_TIME | Integer | The elapsed time when entity will turn around. When entity begins an attempt to switch direction, turn_time is populated with elapsed time plus its turn delay model property. When elapsed time catches up the entity turns. |
ENTITY_PROPERTY_UPDATE_MARK | Integer | Bit masked field that various update functions use to track when they have completed their respective actions on an entity. This allows some functions to be run asynchronously and deal with interruptions during the update process (i.e. taking hits, commands, etc.). When an update function completes, it marks update_mark accordingly. When the same update function starts, it evaluates update_mark and if its own flag exists, the function exits without taking further action. See the following constants: * openborconstant("UPDATE_MARK_CHECK_GRAVITY") – Gravity logic completed. * openborconstant("UPDATE_MARK_CHECK_MOVE") – Movement logic completed. * openborconstant("UPDATE_MARK_NONE") – No updates completed. The entity’s update_mark resets to this value at the start of each update cycle. * openborconstant("UPDATE_MARK_UPDATE_ANIMATION") – Animation update logic completed. |
ENTITY_PROPERTY_VELOCITY_X | Float | The entity’s current velocity the horizontal axis. |
ENTITY_PROPERTY_VELOCITY_Y | Float | The entity’s current velocity the vertical axis. |
ENTITY_PROPERTY_VELOCITY_Z | Float | The entity’s current velocity the lateral axis. |
ENTITY_PROPERTY_WALK_STATE | int | If true entity is walking. |
ENTITY_PROPERTY_WAYPOINT_COLLECTION | Pointer | Pointer to array of waypoints used by entity when attempting to pathfind around obstructions. |
ENTITY_PROPERTY_WAYPOINT_COUNT | Integer | Number of waypoints in use. |
ENTITY_PROPERTY_WEAPON_ITEM | Pointer | Pointer to entity that was picked up as a weapon. This allows the item to remain in memory to track (among other things) how many times it was picked up and lost. This only stores the item object itself – it has nothing at all to do with how the entity that picked it up behaves. For instance, if Billy picks up a bat, the bat’s pointer populates Billy’s weapon_item property. Presumably Billy now wields a bat, but that is determined by Billy’s own model settings in relation to the Bat’s weapon number. |
ENTITY_PROPERTY_WEAPON_STATE | Integer | Bitwise flag controlling weapon behavior states. * openborconstant("WEAPON_STATE_NONE") – Entity is not a weapon.* openborconstant("WEAPON_STATE_ANIMAL") – Legacy “Animal”. Behaviors to emulate ridable animals from Golden Axe.* openborconstant("WEAPON_STATE_DEDUCT_USE") – Limit use item will deduct 1 from its accmo count.* openborconstant("WEAPON_STATE_DEDUCT_USE") – Legacy “typeshot”. Item is limited use with a remaining count shown in HUD. |
Constant | Type | Description |