problems with attack/spell animations

Get help using Construct 2

Post » Wed Mar 07, 2012 9:30 pm

Was hoping someone could help me with a problem. In my topdown rpg-style game the player (a black mage) have two different attacks: hit and spell.
I got it working so when hes moving he stops and performs the correct animation in correct direction and then countinues to move. Im using a variable for when hes attacking/casting (AT)so he wont move at the same time and ignores 8-dir input untill animation is done. Now the problem is that if he stands still he cant do two of the same attack in a row, he has to alternate attack or he cant move again. Any input on this would be greatly appreciated. Ill link the capx. Thanx

mage.capx
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Wed Mar 07, 2012 10:10 pm

Firstly, I saw your objects screen and fell on the floor! There is an easier way to do all that scenery!

Make one object called 'scenery' or something, then make each image a frame of the default animation. Set the animation speed to zero.

Now you can set the frame in the layout editor or by events. Just like a tileset.

About your original problem... It turns out to be a simple solution.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Mar 07, 2012 10:21 pm

ok.. thanx, yes it was a simple sollution, guess I stared me blind on it :)

edit:

hmm.. just tested the sollution capx you linked, problem is still thereMonDieu2012-03-07 22:34:47
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Thu Mar 08, 2012 1:31 am

Hmm? In the capx I posted, I can't make a situation where he is frozen or cannot make a specific move... was the problem different??
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Mar 08, 2012 8:29 am

when the player isnt moving (no movement key is down) and I press X twice he cant move after that.
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Thu Mar 08, 2012 8:57 am

I made a textbox that displays some status of variables every tick. While not moving and I press X (or C) twice the variable AT isnt set back to 0 the second time.

edit:

link to show you: game with status textMonDieu2012-03-08 09:03:40
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Thu Mar 08, 2012 12:02 pm

Solved it! Instead of using "animation finished" I set it to change the AT variable when the apell/attack animation reaches last frame. Thanks for your help.
B
21
S
7
G
4
Posts: 221
Reputation: 5,070


Return to How do I....?

Who is online

Users browsing this forum: bluemonkey, MarkThomas and 22 guests