Same enemy in different colors

0 favourites
  • 6 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi, I've been working in a game and so far I just have 1 kind of enemy, so I was wondering if there's a way to have sprites in different colors

    and then changing them randomly during the creation event.

    Thanks.

  • youd have to have graphics for each color and then make animations from those just like the normal original color. Until r100 (probably) there wont be a way to recolor a sprite effectively at runtime

  • Like aridale said, it will be available with WebGL shaders in r100. It is currently possible to do it with the "source atop" effect. Check out R0J0hound's example here. Or you could try out Pode's "Recolor Sprite" behaviour. (I haven't tried it though)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, I'll look into the examples.

    About the option in which I create the graphics for different colors, is this what you mean?

    Objects:

    EnemyBlue

    EnemyRed

    EnemyYellow

    Then I would have to create all the events that currently involve an 'Enemy' Instance 3 times? One for each new colored object? or is there a way to treat the 3 objects as just one?

  • Nah, he meant having different animations in one object. That way you'll need only one set of events. OR you could do it like you just said with multiple objects and use families, but you'll need a license for that.

  • Ok, I solved it, I didn't know you could concatenate strings but I used several animations like attack1 and attack2 and then in the event changed the animation to "attack" & enemy.color   where color would be 1 or 2.

    thanks a lot!

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