Attack fires only once

Get help using Construct 2

Post » Sat Aug 11, 2012 12:56 am

hi guys, one more question that I can't seem to figure out. THe following two pictures show part of my working code. The problem I'm having is I can only fire at the same 8 direction angle once, before switching to a different angle. Like here if I left click while pointing west it works fine but I cannot left click again facing west unless I left click from say northwest first. Any help would be greatly appreciated. I want to be able to fire from the same angle once.



B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Sat Aug 11, 2012 2:04 am

I believe you don't display enough code for us to give an answer.
Also your logic seems pretty strange, you activate a group (Attacking) but don't deactivate it, you use a trigger sub event (On animation finished) to a condition that is checked every tick the group is activated.

You could put a single event "On animation "AttackWest" finished" as sub event to the "Attacking" group since whatever the angle is you perform the same actions.
Not sure it will resolve your issue though, but I guess it makes the code more logical.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sat Aug 11, 2012 2:41 am

Here's my capx kyatric. I know it's a little messy but I'm hoping you will be able to see my thought process a little better. I plan on cleaning up the code after I get this movement figured out.
capx

Note it requires my updated facebook plugin. I had added a couple of items to the builtin facebook plugin to gather some additional info. Here's the plugin.

Myfacebooklanceal2012-08-11 02:44:54
B
68
S
21
G
15
Posts: 701
Reputation: 15,604


Return to How do I....?

Who is online

Users browsing this forum: DiabloOvermind, emoticon, odiusfly, tarek2 and 16 guests