Action Melee Attack

Get help using Construct 2

Post » Sun Sep 30, 2012 1:21 pm

Hello guys,

I recently started using Construct and I am trying to make an action game. I am getting adapted with the interface, the event sheet and such, but I can't actually find a successful way on making my Player to attack on mouse pressed (or keyboard button) and do damage to the monster.

All tutorials I came across with are only offering examples for projectile attacks, while I want to do a melee attack?

Anyone can help with it, will be appreciated :)
B
3
Posts: 2
Reputation: 279

Post » Sun Sep 30, 2012 1:54 pm

I do not think, that there is that big of a difference.

You have to react to a collision, either from a bullet or between a sword and a bodypart. If you have a CAPX of your project to share, it makes helping easier.
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Sep 30, 2012 7:04 pm

I don't actually have a specific CAPX at the moment. I am pretty much experimenting with the events so I'll know what I will be doing when I start the actual project.

After some trying, I found a way but there's one problem. I used the "on mouse press" event and the collision event with the two objects, but when I click the button, the action loops permanently and does not stop, even if I release the click. Any idea how to fix this? I tried to go with event group and deactivate it after a tick or a 0.5 seconds, but it still does not work right.
B
3
Posts: 2
Reputation: 279

Post » Sun Sep 30, 2012 7:05 pm

...and again, it is a good idea to share the CAPX
B
42
S
19
G
12
Posts: 723
Reputation: 13,911


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound, Rezzon71, Yahoo [Bot] and 27 guests