One attack animation help

For questions about using Classic.

Post » Sat Jun 16, 2012 8:51 pm

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?


https://www.dropbox.com/s/3xyrntjsze8xdh5/Construct%20Attack.cap
B
4
Posts: 35
Reputation: 445

Post » Sun Jun 17, 2012 1:13 am

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 http://sourceforge.net/apps/mediawiki/construct/index.php?title=Main_Page) 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.

http://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.
B
46
S
16
G
3
Posts: 133
Reputation: 4,955

Post » Sun Jun 17, 2012 7:03 am

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?   
B
4
Posts: 35
Reputation: 445

Post » Sun Jun 17, 2012 10:56 am

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 http://sourceforge.net/projects/construct/files/construct/Classic/ConstructClassic_r2.exe/download
B
46
S
16
G
3
Posts: 133
Reputation: 4,955

Post » Sun Jun 17, 2012 5:46 pm

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!
B
4
Posts: 35
Reputation: 445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests