Sep 10
Rating 3.00 out of 5
[?]

isoSetTarget.js contains a number of javascript functions to help with the attacking and targetting aspect of the game. 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.

canTarget(x, y)

Returns Y or N, can position x,y be targeted. Checks the tile attribute “canTarget”

isWithinTargetRange(attackingUnitID, x, y)

Returns Y or n, if position x,y is within targetting range of attacker.

This looks for an attribute called “range”, if found it will use that to see if the distance between the attacker and x,y is equal to or less then it.

This is a true distance calculation.

showTargetRange(unit)

Displays all tiles that a unit can target. This looks for an attribute called “range”.

The maximum range available is 3.

setAsTargetTile(x, y)

Sets the tile at x,y as targettable. Turns on the mouseover and sets the attribute “canTarget” to “Y”

clearTarget(unitID)

Clears any tile so that it is no longer marked as targettable by that specific unit.

Sep 10
Rating 3.00 out of 5
[?]

isoSetMultiplayer.js contains a number of javascript functions to help with the multi player aspect of the game. 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.

updateMap()

Called to request an update to unit positions and stats from the database.

This requires that the javascript variable “mapInfoUrl” be set. (in _isoConfig.js)

When completed this process will call updateMapComplete()

updateMapComplete()

This is the second part to the map update function. You should not be calling this function, instead call updateMap().

The row splitter/delimiter is “::”. The field delimiter is “,”.

You must include a field list in the first row.

If the information from the database contains a unitID, then that unit will be updated. Multiple units can be included in a single update.

If an x,y position is passed for a specific unit then moveUnit(unitID, x,y) is called.

If the life of a unit is different from the life currently displayed a message will appear with the difference in it and the life stat will be changed.

If the life falls below 0, the unit is removed from the map.

An example input that can be given to this AJAX function is:

unitID,unitname,life,x,y::1,Lord,100,5,5::2,Bandit,50,3,1

Sep 10
Rating 3.00 out of 5
[?]

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

Sep 10
Rating 3.00 out of 5
[?]

isoAjax.js contains a number of javascript functions which you can use in your game, it includes a number of AJAX functions. 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.

getXmlHttpObject(handler) - Returns and xmlHttp object, checks browser type to make sure syntax is correct.

sendData(url) - calls url, this is good for when you want to save information tot he server.

send(url, returnFunction) - calls a url, the contents of the url will be returned to the “returnFunction”. returnFunction should be a pointer to a function not the name.

ajaxDone() - You should not have to call this function. This is used when no function is provided when sending data through ajax.

Sep 10
Rating 3.50 out of 5
[?]

isoEngine.php contains a number of javascript functions which have to be written in php. Thus teh php extensions. 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.

Note: Once this file finishes load, it calls startGame(). You must have this javascript function defined somewhere in your included files

  • getObjectAt(x, y) - Returns a div object of the object at x,y. Returns 0 if no object at that point. Does not return multiple objects if objects are stacked.
  • getUnitAt(x, y) - Returns a div object of the unit at x,y. Returns 0 if no unit at that point.Does not return multiple objects if objects are stacked.
  • getUnitIDAt(x, y) - Returns the unitID at x,y. returns 0 if no unit at that point.
  • getUnitIDs() - Returns a comma delimited string of all unitIDs in the game.
  • updateWaitTime(change) - Updates the waitTime for all units within the current map.