Im trying to make a shooting system
Im trying to make a shooting mechanic but when I try, the object will just create its own variable instead of using the one I need it to use
Im trying to make a shooting mechanic but when I try, the object will just create its own variable instead of using the one I need it to use
Nevermind, I solved it.
init = function()
#just put global. infront of your variable
|
|
|
\/
global.variable = 'lol'
end
Any variable you create without the local prefix will be added to "global" . Global is just there so that JavaScript code can reference MicroScript code.
Unless it's a method of an object, which is probably what was happening in this case.