Multiple Enemy sprites/pinned objects

0 favourites
  • 4 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • Hi.

    I have enemy soldiers that use an invisible platforming box with animation sprite object over it that is pinned to it.

    How do I get each pinned enemy sprite to act independently from one another that is other than picking nearest/furthest?

    So when an enemy falls or hits the floor only that instance animates or spawns bullets even if they overlapping?

    Any help would be great, thank you

  • Nevermind! Chat GPT is very useful if you know how to prod it enough lol

    For anyone curious,

    What I did when I spawned or created an enemy, I recorded that enemy sprites UID to a variable in the hitbox.

    When that same hit box lands or falls or does what ever action, it checks the animation objects uid and compares it to the variable of the hitbox that stored the UID. If it equals then only that animation sprite animates! Beautiful

  • Now I have a new problem, they all do it independently but if one is close by it doesnt perform the action, hmmmm. I am still using pick nearest though, maybe the issue is how the nearest is determined?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well here we go lol, next step was to have a check for all animating sprites overlapping the collision object and picks the one with the matching UID. Cool

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