Page 1 of 1

.

PostPosted: Tue Sep 01, 2009 2:48 am
by RaRaMalum
.

Re: if statment in the color field for spawned objects

PostPosted: Tue Sep 01, 2009 3:01 am
by KarateBrot
add this to your scene.addCircle()
Code: Select all
color := {{sim.time == 10} ? {[0, 0, 1, 1]} : {[0, 0, 0, 1]}}

Or is the problem a different one?

[edit]
oh ok... just tested it out. now i know what your problem is. so forget about this post. :D
but that's weird... i try to do something else if i have an idea.

Re: if statment in the color field for spawned objects

PostPosted: Tue Sep 01, 2009 3:09 am
by Chronos
it doesnt automatically correct it. if sim.time is over 10 when it spawns, its gonna be black, no exceptions (unless the code is wrong)

if its still doing this when sim.tim ISNT over 10, something wrong then

Re: if statment in the color field for spawned objects

PostPosted: Tue Sep 01, 2009 3:17 am
by KarateBrot
i know what's wrong...

the code is working and it changes the color after 10 seconds, that's no problem BUT that only happens to the latest spawned circle!
so if you spawn 5 circles and now wait the 5. circle will change its color. the other ones stay at black so this seems to be a bug. it's really worth reporting it.