I don’t really understand the difference between impulse and velocity and motor. @JR01 ?
Also I’ve seen people (like JR01) use different words like “var” which I believe is variable in javascript, but idk how to use it. I’d like a list of these words and what they do. They aren’t in the help section.
oh I think I get it. I was trying to understand your code. Here’s what it says in the expression:
var n1 = A+B;
var list = [400, 180, 0, 400, 270, 225, 315, 270, 90, 135, 45, 90, 400];
list[n1];
so it’s basicly just running the program you write in it?
So you declare a variable “n1” which is A+B, then declare a variable “list”, an array, and fill it up, then you output the "n1"th number of the “list”. I’ve done some programming.
That makes sense, but which line will it return the number? Does it just return the output of the last line? I’d assume so
Looks like its one of my directional movement code (possibly from Witch?).
So the expression itself works like your making a function (which is a little ironic because you can make functions inside this function), but that means that the first line that makes an output will be the output.
For example, if you use return statement in your code, it will kill the expression and output the return value. And if you do math and not set it to a variable, it will output that math and kill the expression.
The one thing about expressions is that its not live code and resets once it outputs. So every eval input, it has to create those variables i made in the expression and run the code.