Attack to Idle animation

Get help using Construct 2

Post » Sun Jun 24, 2012 8:16 am

I added an "attack" animation, but I cannot figure out how to get the character back to the "idle" animation after the "attack" animation has run it's loop.

B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Sun Jun 24, 2012 8:53 am

hmm would you like to see the beginning tutorials?? i think you will know where is the problem ,

after you finish the beginner tutorial make this event:
event:condition: keyboard: z press
      action : player: animation "attack"
this will fix everything.if you want beginner tutorials here are some links :

http://www.scirra.com/tutorials/243/building-a-platform-game-a-beginners-guide
http://www.scirra.com/tutorials/253/how-to-make-a-platform-game
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Sun Jun 24, 2012 9:41 am

I was looking through some of the beginner tutorials and couldn't find the answer. The second link you posted, I am making my game based off of that tutorial.

Plus what you just told me does not correct it. It just goes as far as I've already gotten with it. I need my character to get back into the "Idle" animation after the "attack" animation has run it's loop instead of remaining in the last frame of the "attack" animation.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Sun Jun 24, 2012 10:36 am

because i couldn't see the capx i can't tell you everything but you don't need loop at all !!!

try to to this :
event:condition: keyboard :release z key
      action: set animation to "Idle"
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Sun Jun 24, 2012 12:49 pm

Use the Animation 'On finished' trigger:

Player: On animation "attack" finished
   Player: Set animation to "idle"
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Sun Jun 24, 2012 9:15 pm

Zsangerous, I'm attempting to upload to dropbox now and will soon post it on here. Sorry to frustrate you. Just know that I appreciate everyone's help.
Let me tell you what I have for now since Dropbox seems to be giving me trouble.

{Event}
Keyboard > Space is down > Player > Set animation to "Attack" (Play from beginning)
{Sub Event}
Player > On animation "Attack" finished > Player > Set animation to "Idle" (Play from beginning)

Obviously this is not working: So any tips on how to correct this would be greatly appreciated and I will upload a capz as soon as I can get it to work.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Sun Jun 24, 2012 9:17 pm

Here it is I think:

https://www.dropbox.com/s/h9iagsmbvrnqnkj/Jungle%20tutorial.capx
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Mon Jun 25, 2012 1:11 am

here we go i wish you like it ^^
https://dl.dropbox.com/u/67034121/scirra%20construct2/Jungle%20tutorial.capx its still uploading if didn't work tell me ill re-upload it
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Mon Jun 25, 2012 5:00 am

Yes thank you! You have solved my issue...however I did notice something wrong with it. When the character is jumping left he cannot attack. He can attack every way walking and falling. When he jumps to the right he can attack just fine, but when he jumps to the left he cannot attack.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Mon Jun 25, 2012 5:03 am

I just discovered something. If I hold both left and jump while pressing attack then and only then will it not work.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests