I am literally a noob for this, but I want to learn what to do when scripting in a map.
I understand how functions work ( a bit) and understand vars and stuff, but can someone explain to me what the hell is all means. I really want to create my own stuff, but I need to know what code is for what, and how to make stuff happen. YouTube has nothing for it, all I ask is someone to explain what you can do in a GSC and what each individual var/function does.
Not expecting someone to spend time writing it, but anything that will help a complete new comer to scripting will be nice.
Love you
Last Edit: June 22, 2016, 11:58:17 pm by WigglyWorm
Variables in GSC are either local(only exists within that function) or global(level, can be accessed from any function):
of course, if you want to pass a local variable from one function to another to do logic on, you can pass that function a "paramater" that is then turned into that function's "argument(s)":
(note how the variable names for a and b are not the same as num_one and num_two)
Objects on the other hand(as you may have noticed) are a bit of a exception. Objects are "referenced" meaning that any changes to that object in one function will affect any other references to that object.