Re-use animations? (solved)

0 favourites
  • 9 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hi guys.

    Ive almost finished my demo but Im struggling trying to re-use animations for my enemies. I just cant seem to figure out how to set a copies of an object (my animation object) to 2 items at once (two different enemies).

    Here is an example cap.

    dl.dropbox.com/u/13312935/Animation%20Example.capx

    Im guessing that i need to use instance variables but im not sure...

    Anyone have any ideas? I'll keep trying but im stuck at the moment.

  • I am sorry, but I do not understand, what you are trying to do...even by looking at you CAPX, Maybe you have another way to explain to me, what you are to achive

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the help Wei,

    What im trying to do is make 2 objects share the same animation sequences. In my cap.x i have my player sprite and two seperate enemy sprites. I am attempting to set my single animation "arrow" to both objects, (thats why there is two copies of the arrow sprite in the layout).

    If i have two copies of the 'same' enemy it works, but when one of the copies does something that calls for an animation - all of the copies play the animation as well.

    My goal is to save file space by not needlessly using duplicates of my animations.

    hopefully i was more clear in this post?

  • so, what you are saying is, taht you have two instances of one spreit, and they should play different animations at the same time?

    Take a look at this CAPX

  • Ahh your the best Weishaupt! Thanks man! :)

    Ive just updated my original cap.x if anyone wants to learn from it. (Wohooo!)

  • Like this?

  • picking problem (:

    picking.capx

  • ha - i took 10 minutes to figure out the picking in Wei's cap i didnt even see your post Cheers.

    Its impressive but how does the "instance: Enemy.IID" know which enemy to go to?

  • well there's some hiddent trick

    in the first event, each instance of enemy is matched with each instance of arrow by their IID

    But in the comparaison you have to pick the proper arrow else you influecne all of them.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)