Conflict between walk and attack animation

Get help using Construct 2

Post » Sun May 25, 2014 5:26 pm

Basically I am making a side scroller, kinda like hack'n slash. When my player is walking, walk animation is playing (duh :lol: ) and then when i left click he is supposed to stop, play animation attack1, start ignoring platform user input and on attack1 finished stop ignoring user platform input.
That sounds simple enough but when i walk and click he stops and then I have to click again in order for him to start his attack animation. It's really annoying, and I have no idea how to fix it. I searched quite a bit but didn't find anything so any help would be useful.
Thanks in advance.
B
7
S
2
Posts: 102
Reputation: 975

Post » Sun May 25, 2014 5:50 pm

Post screenshot or capx, need to see the event's.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Sun May 25, 2014 6:03 pm

Message: Berserky can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://www.dropbox.com/s/yid9q1k643gjce5/Untitled.png

Here, just to explain kraljhitBox is basically for my movement and collisions.
B
7
S
2
Posts: 102
Reputation: 975

Post » Sun May 25, 2014 6:08 pm

But i think i should remake the way it works,it just seems to clumsy.
B
7
S
2
Posts: 102
Reputation: 975

Post » Sun May 25, 2014 6:34 pm

You should make an animation manager. They all have to be in a sort of switch case format to work properly for each sprite.
For instance;
Code: Select all
If X, play this animation,
else if x, play this animation
else, default to this animation.

Every single animation for a family or sprite should be in here, otherwise you can have animation glitches on your sprites. Using the "Else" event condition will assure that only one can happen at a time.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Sun May 25, 2014 6:39 pm

Perhaps with boolean instance variables. One for isWalking which at the beginning of the layout you set to true and once you press left mousse button goes to false.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun May 25, 2014 8:02 pm

What happen if you delete / Start ignoring platform user input.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Sun May 25, 2014 9:03 pm

Yeah that actually works, I used system>set group active instead of ignoring user input . Thanks guys for the help.
B
7
S
2
Posts: 102
Reputation: 975


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, namaewayukidesu and 11 guests