utkarshs432's Recent Forum Activity

  • Was doing that only by comparing vector X but the same thing was happening that's why tried changing to system condition instead-but same result :(

    How can I create this container which relates to the enemy? Sorry I didn't understood :(

  • Only one at the moment

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not at the moment but yes I plan to add more enemies to the level

  • Hi guys,

    So I'm learning Construct 3 being new in game development & I'm trying to learn it by making a simple platform game wherein the player has to go through levels and beat enemies to win the game.

    I'm currently facing a problem with player knockback when it's hit by an enemy sword.

    I'm pasting the screenshot of the event sheet where the logic of knockback is written below -

    I'm using sprite boxes for player, enemy, player sword & enemy sword so basically the idea is if the enemy attacks the player, the player will take a hit, flash & have a knockback if the player's X is less than the monster's x then the player's X vector is set to -400 from current X & if player's X is greater then monster's X then player's X vector is set to +400 from current X.

    However this code is not working as I think it should, instead please see the video below of what's happening -

    Subscribe to Construct videos now

    So basically, when the player is standing on the left side of the screen from the monster (Player's X is less than Monster's X) the player is getting knocked back into the monster rather than getting pushed behind, however, it's correct when it's the other way around. Also for some reason, the knockback animation is not getting played every time only sometimes.

    I've tried a lot of conditions but I know I'm doing something wrong here just not able to figure it out maybe that's not how you do a knockback? Can someone please help & point me in the right direction?

    Thank You!

utkarshs432's avatar

utkarshs432

Member since 16 Jun, 2022

None one is following utkarshs432 yet!

Trophy Case

  • 2-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies