Hello guys,
I´m doing some tests with phisics and sudenlly the "foreach" loop stopped to work when I moved it to "On start of Layout" event, please, see the image:
The foreach marked in yellow should execute! It seems that No1 instances are not created but they are!
You can try it yourself with this capx:
https://dl.dropboxusercontent.com/u/16702799/Perguntas%20em%20Foruns/Teste.capx
obs: The "alert" are only for debugging and can be disabled.
Develop games in your browser. Powerful, performant & highly capable.
C2 doesn't let you pick newly created objects until the next top level event. Make a second "On start of layout", and move your Foreach there. There is a rope example here: . Your distance-joint code wasn't working for me.
[quote:2rq5swak]C2 doesn't let you pick newly created objects until the next top level event
This is sad.... They need to explain it on the manual!
Thank you I will try your suggestion
yeah.. there recently was a long discussion about it when I posted it as a bug: viewtopic.php?t=178366
Basically, newly created objects get added to a "new object list" and aren't merged into the "instance list" until next "top-level event".. However, a newly created object forces the SOL to consist of only that new object..
Anyways. rexrainbow created a plugin that allows you to easily pick all the objects: http://c2rexplugins.weebly.com/rex_ginstgroup.html
I agree that this stuff should be explained thoroughly in the manual if it isn't in it.