CircleCount
14 posts • Page 1 of 1
CircleCount
Hello. back again and hungry to learn more...
Straight to the question, is there a way to see how many circles there are in a scene? Or to make spawned boxes not count as a geom? Like glue it to the backround and then delete it? Please help me, I'm on my biggest thyme project (so far).
If someone knows how to count circles with cake like "sim.circlesWithCakeCount" or how to make one yourself that would also be appricieated.
I hope my english is alright.
Straight to the question, is there a way to see how many circles there are in a scene? Or to make spawned boxes not count as a geom? Like glue it to the backround and then delete it? Please help me, I'm on my biggest thyme project (so far).
If someone knows how to count circles with cake like "sim.circlesWithCakeCount" or how to make one yourself that would also be appricieated.
I hope my english is alright.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: CircleCount
To see how many circles there are, you can select all (ctrl+a) go to select -> select circles.
then you can go to velocity, where it will say 'Velocity for ... circles'
idk how you can see it in scripts. maybe you can do it in variables. if you have 10 circles in a scene, just make a variable 10 + 1 for every circle that you spawn and -1 for every circle that gets deleted.
if you want to this with the cricles with cake only, you should do something like this.
(not sure if this works, haven't tested it )
EDIT : tried it and it doesn't work. never knew it didn't work with true and false. Controlleracc is better solution.
then you can go to velocity, where it will say 'Velocity for ... circles'
idk how you can see it in scripts. maybe you can do it in variables. if you have 10 circles in a scene, just make a variable 10 + 1 for every circle that you spawn and -1 for every circle that gets deleted.
if you want to this with the cricles with cake only, you should do something like this.
- Code: Select all
(e)=>{e.other.DrawCake == true ? {scene.my.count = scene.my.count + 1} : {}}
(not sure if this works, haven't tested it )
EDIT : tried it and it doesn't work. never knew it didn't work with true and false. Controlleracc is better solution.
Last edited by TimTheOne on Mon Apr 12, 2010 4:24 pm, edited 1 time in total.
- TimTheOne
- Posts: 40
- Joined: Tue Jan 12, 2010 9:22 pm
Re: CircleCount
That wouldn't work. If the same circle hits it twice, it'll count as two instead of one. You could fix it by turning off the circle cake after it collides, though.
TheWinkits wrote:They both looks of cuking amazing
-
Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: CircleCount
Your code doesn't work.
Seems to be a bug with drawcake.
- Code: Select all
{e.other.controlleracc == 11} ? {
scene.my.count = scene.my.count + 1;
e.other.controlleracc = e.other.controlleracc = 12
} : {}
Seems to be a bug with drawcake.
Last edited by Mystery on Mon Apr 12, 2010 11:51 am, edited 1 time in total.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: CircleCount
It is readable i think there is a funny way to read bool (True / false) variables. Either that or its a bug.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: CircleCount
Actually, I just noticed he used = instead of ==.
TheWinkits wrote:They both looks of cuking amazing
-
Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: CircleCount
With Bool i think you use =
== doesn't work anyway.
== doesn't work anyway.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: CircleCount
well I'm doing some Genetic research and want to see how many boys, girls and how big the entire population is...
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: CircleCount
entire population for what? another evolution sim?
If it is another evolution sim the best way to count is by adding 1 to scene.my.countboys every time a boy is born and taking 1 every time a boy dies.
Same goes with girls scene.my.countgirls.
scene.my.countboys + scene.my.girls = entire population
If it is another evolution sim the best way to count is by adding 1 to scene.my.countboys every time a boy is born and taking 1 every time a boy dies.
Same goes with girls scene.my.countgirls.
scene.my.countboys + scene.my.girls = entire population
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: CircleCount
Ah, i see that i made a mistake in my code with the =, it should indeed be ==.
i never tried an if statement with a true or false, but i guessed it would work. clearly it doesn't.
so ignore that part of my post ^-^.
The best way to do it would prolly indeed be to use controlleracc.
i never tried an if statement with a true or false, but i guessed it would work. clearly it doesn't.
so ignore that part of my post ^-^.
The best way to do it would prolly indeed be to use controlleracc.
- TimTheOne
- Posts: 40
- Joined: Tue Jan 12, 2010 9:22 pm
Re: CircleCount
thank you Mystery. Btw, sounded like the evulotion simulations ain't so popular.entire population for what? another evolution sim?
If it is another evolution sim the best way to count is by adding 1 to scene.my.countboys every time a boy is born and taking 1 every time a boy dies.
Same goes with girls scene.my.countgirls.
scene.my.countboys + scene.my.girls = entire population
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: CircleCount
Its just that there are already a heap of them.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: CircleCount
Yeah but I hope you think mine is special. It works perfectly and have a realistic evolution and I so many ideas to put to this project.
I hope it will be special for you, though it's quite fun to watch them multiplyand evolve
I hope it will be special for you, though it's quite fun to watch them multiplyand evolve
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
14 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests