Platformer - Player won't get knocked back!

Get help using Construct 2

Post » Sat Sep 28, 2013 4:31 am

So I've been at this all day trying many different things from setting vectors to changing gravity and even sitting on my foot. Nothing has worked so far. (No seriously, my foot is numb now. Why do I always sit on my foot?)

So I'm trying to do something very simple and basic. Player walks into enemy, player loses 1 health and gets knocked back a bit. Like I said, I've read and tried many different things I've read in these forums... nothing seems to be working.

Here's the file: https://dl.dropboxusercontent.com/u/98323832/Construct2/BrokenPushback.capx

What am I missing?!?!?
B
10
S
1
Posts: 12
Reputation: 476

Post » Sat Sep 28, 2013 6:08 am

It's really simple. Just type "knock back" on the forum's search tool and replicate one of the many examples already provided by the community.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sat Sep 28, 2013 6:35 am

you could try
seet position self.x to self.x-10
B
20
S
8
G
2
Posts: 122
Reputation: 3,202

Post » Sat Sep 28, 2013 7:46 am

set the player box max speed to something like 400, or so and it should work, but you have to reset the speed to whatever it is after the knock back is done.
B
25
S
7
G
1
Posts: 83
Reputation: 2,550

Post » Sat Sep 28, 2013 1:40 pm

@Sargas Thanks for the suggestion, but I tried that. I've at least 3 or 4 downloaded examples I found in the forums and for some reason it works in those example file but not in mine.

@ash1221 Yup, I've tried that too. Unfortunately, it more of a teleportation and not a gradual movement from where he's hit to where he ends up.

@BACLog Thanks! That actually worked! I gave it a "Wait" of 1 second to return it back to its normal speed. Works like a charm!
B
10
S
1
Posts: 12
Reputation: 476


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Nicolas951, tarek2 and 7 guests