For each element set animation of element to

Hello, is there a way to “set animation of element” of elements in a list in a for each loop. Say a list of animals having set animation to “run” in for each loop for all elements in the list.
Strange enough the “set animation of…” action does allow selection of any item on the stage except an “element” of a list (no data element “element” allowed to add in this action!!)
Hope somebody can help me out.

1 Like

Hi @pete_r61 let’s see if this CoSpaces Tutorial may help.
(If so please remark as resolved) :wave: :wave: :wave:

PS: I also suggest to take a look at very clear post created by @Stefan

1 Like

Thanks for your reply…

Basically the suggested method works for what it does, but is not really a solution to what I try to establisch as I do depend on the animation set/build-in to the “movement” statement. What I actually tried to accomplisch is to set the animation property of each animal in block-code. But for that to work I must be able to use the “element” in the list as a variable representing each subsequent animal. Then while being at such an element, be able to change the animation property to whatever animation is available in the animal object. But since I can not set “element” as a recognisable object type of the scene somewhere, it probably does not show up selectable in the 'set animation of ‘scene-type’ to ‘available-animation’ ". Where in this case scene-type should be scene-type ‘element’.


@Giuseppe_Schiuma do you have a suggestion?

1 Like

Hi @pete_r61,

The only way to do this is with Typescript, and you’ll still need to specify the animation (though many animals will have “Walk”). Unfortunately it’s not currently possible to get a list of the animations available for a particular object, so it must be done manually.

See CoSpaces Edu :: Copy & Animate Objects with Scripting for an example.

Hope that helps!

Geoff @ TechLeap