Hello I am doing a 1 vs 1 game. I use the real time services. I have my real time script working. But I have an issue with the real time modules. I want the module to be able to access a var from the rt script and modify it.
for example
//RT script
var foo;
var mod = require("module");
mod.RandomFoo();
//RT module
module.exports.RandomFoo = function(){
foo = 1;
}
I wonder if there is a way do this without passing the var as parameter and then return it again.
Otherwise I want to know what is the best way to acomplish this. (Like store the data in a datatype, or something)
Álvaro Pérez
Hello I am doing a 1 vs 1 game. I use the real time services. I have my real time script working. But I have an issue with the real time modules. I want the module to be able to access a var from the rt script and modify it.
for example
I wonder if there is a way do this without passing the var as parameter and then return it again.
Otherwise I want to know what is the best way to acomplish this. (Like store the data in a datatype, or something)
Thanks.