Re-use Events for multiple similar enemies

0 favourites
  • 4 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • tl;dr How do you concatenate an animation name in an event using a local variable? Is that even possible?

    I know this is simple but I am not finding the solution for some reason. I have an enemy set up with its AI events, and I want to have another similar enemy (different art) use those events. All the animations for both enemies are in the same object.

    Basically if blueGuy gets hit it plays blueGuy's hit animation, but if it is redGuy it plays redGuys's animation.

    I have a local variable that defines which enemy it is, and I need to call that local variable with the ending of the animation name in the events. So (local variable & walk) would give blueGuywalk for blueGuy's walk animation.

    I'm sure there are topics on this already, I just couldn't come up with the right search terms. If you could point me to them that would be great!

    Thanks!

  • Doesn't "Set animation" to <localvar & "walk"> work? It should.

  • Right that's what I need. But how do I enter that in Set Animation? I get invalid character errors.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • DOH! I got it. It's Object.variable & "Walk". Major brain fart on that one...

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