Help !
3 posts • Page 1 of 1
Help !
I want to spawn circles with variable density, using a variable called scene.my.density and I am cannot do that anyone can help me ?
Gears are my favorite mechanism. Why do you think I have this username ?
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
-
Gear97 - Posts: 146
- Joined: Sat Jan 02, 2010 5:34 pm
- Location: Brazil
Re: Help !
if you want to do so statically, you can use density:= scene.my.density.
for the variable to be updated in realtime you might want to use {scene.my.density} instead, but it appears to be impossible to be done in 1.6.0(so 1.7 beta is required, but hey, you own algodoo, don't you? )
for the variable to be updated in realtime you might want to use {scene.my.density} instead, but it appears to be impossible to be done in 1.6.0(so 1.7 beta is required, but hey, you own algodoo, don't you? )
Jrv wrote:TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.
GTFO newfgt
-
RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: Help !
do you want to spawn multiple circles with one variable density or multiple circles with individual densitys and do you need the value to be set in stone after spawn or rather linked to the one or multiple density variable(s)?
using a universal density variable goes like either scene.addcircle({density:=myvariable}) for fixed value (scene.addcircle({})).density={myvariable} for updateable value. for individual values you need another variable to keep track of values assigned, lets call it mycount and can be used like for(mycount, (c)=>{eval("(scene.addcircle({})).density={myvariable"+c+"}")}) with variables declared and their values set for myvariablemycount during or previous to the loop
using a universal density variable goes like either scene.addcircle({density:=myvariable}) for fixed value (scene.addcircle({})).density={myvariable} for updateable value. for individual values you need another variable to keep track of values assigned, lets call it mycount and can be used like for(mycount, (c)=>{eval("(scene.addcircle({})).density={myvariable"+c+"}")}) with variables declared and their values set for myvariablemycount during or previous to the loop
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests