Login Register Password Lost

Monster editor

The monster editor allows to define monster or other moving characters on the map. You can add, rename and delete monsters however the "DefaultMonster" must be kept as the engine uses it as base for the logic.

Monsters can define special parameters which can then be used in the code for quickly tweaking the logic of a monster without having to modify the code. Some parameters are however common to all monsters and cannot therefore be removed like:
Speed Defines the speed at which a monster moves across the map.
Base Damage Defines the damage produced by the monster when attacking.
Attack Speed Expressed in seconds, it's the cool-down between two attacks.
Proximity Attack Distance in pixels between the monster and the player before the monster can attack.
Art The character art used to display the monster on the map (as defined in the character editor).
Life The life the monster has (HP available by the monster).

"Stat Drops" and "Item Drops" allows to reward a kill and will add an object on the map which can then be picked up by the player.

If the monster don't define the function "Handle" in the script code (defined in the bottom part), then the DefaultMonster "Handle" code will be run.

The "Handle" function receive as parameter the monsterId:
function Handle(monster)
The monsterId is then used by many Script API functions.

Two functions can be used to move the monster:
Monster.RandomWalk Randomly move the monster around.
Monster.HuntWalk Use a path finding algorithm to move the monster toward the player.

By default, the code make the monster move randomly unless the player is in a given range in which case the monster will then be attracted by the player.

Next: NPC Editor.

© 2016 - 2019 - A. Bertrand - Terms & conditions