One attack animation help

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi, So I created a simple attack feature for my Player using a reference tutorial I found here on the forums. I followed it as closely as I could. however, when I press the "Attack" key the player keeps triggering off it's attack animation and will not stop. Nor dose the Hitbox for the attack follows with the attack animation it just sticks to the player. Could someone here please look at my code to see what I am doing wrong?

    dropbox.com/s/3xyrntjsze8xdh5/Construct%20Attack.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I'm not an expert by any means, so if anyone has a better way feel free to jump in. I thought your code looked a bit overcomplicated so I remade this the way I would do it (which probably isn't the best way either, but I find it easier to understand).

    One thing I noticed is that you had a lot of sub events, these behave differently to normal events (see construct wiki sourceforge.net/apps/mediawiki/construct/index.php I didn't think they were always necessary where you had used them and seemed to complicate things.

    Also, I noticed that some of your animations were set to loop (ie attack animation) when you would probably only really want it to play once.

    I've remade your .cap but left a few things out - like the hitbox as I wasn't sure how you wanted to implement it. I don't know if it fixes your problem, because it's structured differently and you may have structured it your way for a reason, but look at it as an alternative way to do things - and the animation for attack is now working.

    dl.dropbox.com/u/70305965/attack.zip - updated .cap - note your version of construct is older than mine, so you may need to dl a newer version to look at this.

  • Ah I see now... Yea It wont let me open the file so my version of construct classic is old. I clicked on the Check for update button at the top of the program, It says I have the latest version Classic r1.2 can someone send me the download link to the updated version to classic or do I have to download Construct 2?

  • Yeah, I'm not sure why but it's a bit disorganized - I had to dig through the forum to find the latest version - anyway there's a link here sourceforge.net/projects/construct/files/construct/Classic/ConstructClassic_r2.exe/download

  • Wow, thank you so much for all your help buddy!! Yea that make sense about my attack animation being looped. I am using image points positioned in front of my Player for my hitbox during the attack.

    Thanks Again!

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