Entities

Entities are an important extension of ARM. This page will continue to be updated as more of the functionality of entities is determined and written.

TRIGGERS
Triggers as the passive effects of entities, activated when a condition in game is met or brought into question.

Dummy: Debug trigger. Will never fire.

OnPlayerCollide: Fires when the entity collides with the player.

OnTimer: Fires at given time interval(s). NYI

OnSpawn: Fires once when the Entity is spawned.

OnTerrainCollide: Fires when the Entity collides with terrain.

OnAttacked: Fires when the Entity is attacked by something hostile to it. NYI

OnEntityCollide: Fires when the Entity collides with another Entity.

OnDeath: Fires when the Entity's HP hits 0.

ACTIONS
Many of the features of entities are actions. These functions control items such as entity properties, sounds, changing maps, and damage to both player and NPCs.

Global Effects

dummy: Debug action. Does nothing.

playSound: Plays a sound. NYI

displayDialog: Displays a dialog box.

Player Manipulation

warpPlayer: Warps a player to a given location.

changeMap: Warps the player to a location on another map.

giveItem: Gives the player a new item.

removeItem: Removes an item from the player's inventory.

giveAmmo: Gives the player ammo for one of his weapons.

removeAmmo: Removes ammo from one of the player's weapons.

Entity Manipulation

destroyEntity: Destroys an Entity, possibly itself.

damageTarget: Damages a target, possibly itself, or the player.

spawnEntity: Spawns an entity at a given location.

setAni: Sets the animation of the Entity.

setProp: Sets a property on the entity level.

Movement

reverseDirection: Reverses the Entity's direction.

Movement Methods

moveLine: Makes the Entity to move at a constant speed in a given direction.

moveWander: Makes the Entity wander randomly, by moving in a random direction for a given time interval before changing directions.

GLOBAL VALUES
Global attributes about the game world, that can be pulled as any property.

%: A special character. When used as a value to a property, it gets the value of the property  and returns it.

playerfacing : The current direction the player is facing.

playerx: The player's current x position.

playery: The player's current y position.

KNOWN ISSUES

 * IDs not revealed to the user very intuitively yet.