isoSetMovement.js contains a number of javascript functions to help with moving and the movement of a unit. These functions are available in javascript client side code only. You may use all or just some of these functions. Each function is listed here.
Modifying this file means that you will not be able to easily upgrade to the next version. This file could have changes made to it in a future version.
isWalkable(x, y)
Returns Y or N, if a unit can walk on position x,y. Checks to see if an object or a unit is on that particular spot of the map.
showMovementRange(objUnit)
Sets the map tiles to moveable icons for the specific unit. This expects that objUnit will have an attribute called “movement” this will be used to specify how far the agent can move.
If no movement attribute is available the default is 2.
The maximum movement that this function can handle is 3.
setAsMoveTile(x, y)
Sets the tile at x,y to a moveable tile.
It will show the move over lay for the tile.
It will also set the canMoveTo attribute for that tile to Y
clearMovement(unitID)
Clears all tiles of the movement attributes
It will remove the move over lay for the tile.
It will also set the canMoveTo attribute for that tile to N
Leave a Reply
You must be logged in to post a comment.