Another random?
10 posts • Page 1 of 1
Another random?
- Code: Select all
geval("(cos(sim.time))")
Or is this bad for algodoo?
-
TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Another random?
What does geval do?
And did you try simultaneously spawning several circles with that set to vel? Methinks it would repeatedly spawn multiple circles with the exact same velocity.
And how do you turn that into a scene.my thingymabobber? I'm OK with this, because it can be used multiple times in a scene without failing.
And if I stick it into my config, will it automatically appear in every scene that I open?
And I suggest they add a math.random function!
And did you try simultaneously spawning several circles with that set to vel? Methinks it would repeatedly spawn multiple circles with the exact same velocity.
And how do you turn that into a scene.my thingymabobber? I'm OK with this, because it can be used multiple times in a scene without failing.
And if I stick it into my config, will it automatically appear in every scene that I open?
And I suggest they add a math.random function!
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-
Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Another random?
Someone Else wrote:What does geval do?
geval is the same as eval, but in the global scope.
Someone Else wrote:And did you try simultaneously spawning several circles with that set to vel? Methinks it would repeatedly spawn multiple circles with the exact same velocity.
Yep
Someone Else wrote:And how do you turn that into a scene.my thingymabobber?
- Code: Select all
scene.my.bla = {geval("(cos(sim.time))")}
-
bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Another random?
bozbez wrote:Someone Else wrote:What does geval do?
geval is the same as eval, but in the global scope.
What's eval?
What's global scope?
Slightly off-topic, but what's the math.floor thing? TC42, you know what I'm talking about.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-
Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Another random?
Someone Else wrote:bozbez wrote:Someone Else wrote:What does geval do?
geval is the same as eval, but in the global scope.
What's eval?
What's global scope?
Slightly off-topic, but what's the math.floor thing? TC42, you know what I'm talking about.
eval - evaluates the function in the current scope.
geval - evaluates the function from the root (root scope).
math.floor - same as in javascript, if you have a number like 45.678, if you do math.floor(45.678), (im guessing the syntax here) you will get 45, if you do math.floor(10.2) you will get 10. Basically it removes the decimal.
-
bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Another random?
Define "evaluates the function in the current scope" and everything else you just said.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Another random?
evaluates the function in the current scope - does the function where it is (its country, or branch (of a tree) )
evaluates the function from the root (root scope) - does the function from the globe or root (of that tree).
evaluates the function from the root (root scope) - does the function from the globe or root (of that tree).
-
bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Another random?
I still have no idea what you are talking about.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Another random?
There is no point to use geval or eval here. Just search "random" in script forum. There was a lot of examples.
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
10 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests