[Help] Unkown delay between attack animation.

Get help using Construct 2

Post » Tue Feb 28, 2017 10:48 pm

Message: TAINTLAZER can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hey guys!

New to the Scirra, Construct, and the forums.

Ive been working on a project just to get my feet wet with coding and making games. So far I have figured a good amount out via the subs and sites like youtube, but Ive come across a minor issue that is making my head hurt lol.

The game I am making is a basic platform hack-n-slash system with Dark Souls / Castlevania influence (most definitely not publishing, just experimenting).

I am going the state machine route for animation and my question is this:

How do I decrease the time between attack animations and what is causing it?

Here is my .capx

https://drive.google.com/uc?export=download&id=0B7pY-4tAA7E6NC0xMG80cGlIR2c


Excuse my most likely disastrous code, as I am completely new to all of this haha.

Thanks!!
B
5
S
1
G
1
Posts: 2
Reputation: 835

Post » Wed Mar 01, 2017 12:16 am

I looked at your CAPX.

You have a wait 1.2 seconds and you are resetting the player to idle anytime it is not attacking so that is causing the delay between attacks. The player goes back to idle only after the 1.2 seconds expires so not a quick reaction if you want multiple attacks one right after the other.

I don't use State for player mechanics which can cause delays and odd actions for that very reason.

If you have buttons down or multiple clicks without reading when button or click is up you get weird results.

I would rewrite it without using State but it is good practice so try some different ways of setting your player to idle only when nothing ELSE is happening including standing on the platform.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Wed Mar 01, 2017 12:55 am

Hey lamar, thanks for the feedback.

The reason I have the 1.2 second wait time is to get the animation to stop looping on time, and to also disable player movement for the duration of the attack animation.

For some reason the animation loops and I feel if I can figure out how to prevent the states from looping animations I should be ok to use the wait time at a lower value. But I also dont believe that is the only element affecting the attack interval.

I will definitely look at re-writing without states, Thanks!!
B
5
S
1
G
1
Posts: 2
Reputation: 835

Post » Wed Mar 01, 2017 3:56 am

Your animation was looping because of the every tick event. I removed that and did some editing to help fix your animations and make them seamless like intended, even if it's a slightly unclean solution.

https://dl.dropboxusercontent.com/u/589 ... Souls.capx

Edit: linked the wrong file (or rather wrong directory), it's fixed now
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
47
S
24
G
30
Posts: 517
Reputation: 19,464


Return to How do I....?

Who is online

Users browsing this forum: RobertMKD and 2 guests