|
mplay_data_write(ind,value) |
|
ind = the slot where the value will be written value = the string or real you’re going to write into the slot.
Example
The above will simply add something to the score and when it has added it will update the slot 43 with the actual score. That is all.
Note that you need to be careful on who writes data and who reads, because for example letting both players write whatever they want maybe can cause havoc and the game will go out of control. A simple mechanism can be used for example a master-slave. The master (who made the session) will hold the game and calculate everything. While the slave (who joined to the session) will simply read all the data the master sends.
gml_josea – Revision #1 |