How to create sprites on top of certain objects for animation purposes (ex: enemies, player)?

1 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • The purpose of what I am trying to accomplish is to rid myself of the need to add an object for animations for each collider to any layout. This way I will lessen the possibility for mistakes and my workload in the long run. Plus, this method may come in handy for other things in the future - given some slight tweaks.

    Here's the situation. I have a sprite object for my colliders and a sprite object for my animations for my player and enemies respectively. For clarity, from here on I will refer to the sprite object named collider as "Collider" and the sprite object used for animations only as "Animation". Here's what I want Construct to do - my pseudo code if you will...

    On start of layout > search objects in a group called "Colliders" on layout > check if any of the colliders on layout do not have their respective Animation > if any missing, create the needed Animation at the position of the Collider that needs it

    After this, I will need a way to make sure each Animation follows it's Collider based a tag system.

    Here's what I've tried:

    I've tried using a string instance var as a tag to identify what belongs with what for Construct. I've also created separate groups for the Animations and Colliders. As of now I can count the sprites of each but that doesn't help me. I figure I need a do while loop and a for each loop to accomplish this but this has been a wall to me for days and I can't find anything on it anywhere. Anyone want to take a crack at it? I think it would be useful for a lot of people in the long run.

    Thanks in advance everyone!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like you're trying to recreate what a container already does?

  • You're a god send. Funny enough I had already almost found a way to do this using events lol Although, I wonder why this never popped up in my many many searches. Probably due to the way I searched for the solution. Anyways, Thanks again! :)

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