Is there a scene.my tutorial?
5 posts • Page 1 of 1
Is there a scene.my tutorial?
It'd be cool if there is. I've seen people make automatic creations, and even machines fighting each other, and sensors aswell, like if something goes in the sensor, an axle or spring is triggered.
- decepticon
- Posts: 21
- Joined: Sat Dec 17, 2016 12:20 pm
Re: Is there a scene.my tutorial?
scene.my. is just a scope where you can define functions and variables (they saved with scene).
- Code: Select all
scene.my.a := 1;
scene.my.f := (x) => {x +1};
scene.my.a = scene.my.f(a);
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Is there a scene.my tutorial?
@decepticon - What Kilinich said is correct, but I would add that "scene.my." variables and functions are defined in the Global scope, which means that any and all objects have direct access to them. So, for example, your code in a circle or box can directly read and write any scene.my variable. A variable defined in an object which includes a leading underscore character (such as _variable) will be saved as a "local" variable or function which can only be accessed by code within the same object (there are special exceptions to this that require special commands).
So, now you have all you need to know about scene.my!
So, now you have all you need to know about scene.my!
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Is there a scene.my tutorial?
sorry for late reply, thanks xray!
- decepticon
- Posts: 21
- Joined: Sat Dec 17, 2016 12:20 pm
Re: Is there a scene.my tutorial?
You are welcome. And of course if you have any specific questions, ask them here in the forum and someone will answer them.
Have phun!
Have phun!
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests