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