Separate animations for instances

0 favourites
  • 10 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • OK guys, I have a situation and I can't for the life of me figure out how to do what I want to do. Searched the forums, manual, every


    Here is the[/b]

    What I want to do here is make sure that the rotaries play the connect animation when the notches overlap. I have got this working but with a few problems:

    1 - The animation triggers on all rotaries regardless of connection or not, if only one is overlapping.

    2 - The animation doesn't change back when they are no longer overlapping

    I've tried so far what I call an ascending tag system. That is, dishing out tags to instances using instance variables and one global variable. It didn't work XD

    I was considering arrays, but I'm not all that savvy just yet, so I haven't tried.

    What are your opinions, guys and gals?

  • Im on my mobile at moment but if you give the rotary an instance variable then on overlap set variable to 1, another event with condition of rotary variable = 1 to them perform the action

    Edit: you can then set the variable back to zero in the action event.

    Hope this makes sense

  • If you mean an instance variable that changes from 0 for 'not connected' to 1 for 'connected', I did try that, but for some reason it didn't work. I set the animation for 'every tick' to check for a change in value, but the problem I think is having every instance have it's own unique ID, I've not managed to connect the dots so far....

  • Anyone got any ideas, still a bit stuck on this, not sure which direction I should be looking :S

  • Game_BHT_139.capx

    Each object already has an IID and UID, so you probably don't need another tag, but maybe you do, so I left that alone. I think this does what you need.

  • Wow BH, that is amazing! I've been stuck on this for ages and you solved it rather quickly, I checked by disabling the tags and you do need them. At least I was on the right track with those. Thanks very much for helping me dude, means a lot! :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is an awesome solution dude, can I ask a couple of things, everything else makes sense :)

    1 - why do you need to turn on the second notch, I disabled the second, still a good 'un ;D

    2 - when connection is set to '1', where does the variable 'connection' affect the animations?

  • You wouldn't disable them, you'd use UID instead, for example. Often to link things, you store the UID of the other object so that you can always pick, regardless of which object is picked first. If you are happy with a separate ID, then leave it alone.

  • 1 - I obviously misunderstood what you wanted.

    2 - event 15

  • That's awesome, BH :D Thanks again for the help!

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