Joy's Recent Forum Activity

  • This may be hard to explain and I'm sorry I can't share my current .capx, but hopefully someone will understand.

    I have a very large sprite (an enemy) that's attached to a simple, very long vertical rectangle acting as it's hitbox. When the player attacks it (by spawning an square 'attack box' that overlaps anywhere on the enemy rectangle hitbox), the enemy plays a hit animation - all of that is working fine. What I'd like to know is how I can have the player's attack box check the y coordinate when it overlaps the enemy rectangle hitbox, and have the enemy play a different hit animation if it's over or under a certain value.

    Basically I'm trying to fake a sprite having multiple collision boxes by having it play different animations based on where it is attacked on the long vertical hitbox. I've got all my animations set up based on global variables, so I do understand that much. What I don't know is how to set up the events and actions for the collision to check the Y coordinate of the enemy's box and send a value to a new variable that will trigger an animation based on how high the Y value is.

    Any advice is appreciated! Thank you for your time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Joy's avatar

Joy

Member since 17 Jun, 2014

None one is following Joy yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies