How do I Have an object rebound after getting hit by an enem

Get help using Construct 2

Post » Thu Apr 30, 2015 6:10 pm

so all my attempts at this have been mostly straight lines have a look

WHAT I WANT

player-
########
#######
## #####
######
####
###
###
###
enemy

WHAT I GET

player ################# P ###
# ###
# ###
# ###
E ###
E

P
#
#
# P###################E
#
#
E

I tried every thing from vectors to simulate control to move at angle(try to guess which one's which)
but it just doesn't work call me OCDP but HALP

P.S.:if you need a better Idea of the curve think about sonic when he gets hit
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Apr 30, 2015 6:11 pm

it doesn't count spaces ......
Great ... just GREAT
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Apr 30, 2015 6:15 pm

player-
-----------########
-------------------------#######
----------------------------------########
------------------------------------------######
--------------------------------------------------####
------------------------------------------------------###
---------------------------------------------------------###
------------------------------------------------------------###
------------------------------------------------------------enemy

WHAT I GET

player ################# ------------------------P ###
-----------------------------------------# -------------------------------###
-----------------------------------------# ----------------------------------###
-----------------------------------------# --------------------------------------###
----------------------------------------E -------------------------------------------###
------------------------------------------------------------------------------------------E

--------------P
--------------#
-------------#
-------------# -------------------------------------P###################E
-------------#
-------------#
E
B
5
S
1
Posts: 60
Reputation: 495

Post » Fri May 01, 2015 4:50 am

help
B
5
S
1
Posts: 60
Reputation: 495

Post » Fri May 01, 2015 8:08 am

Have you tried adding a physics behavior and using Apply force action?
Even if your not using physics in game specifically you can still enable/disable the behavior as needed.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
69
S
18
G
8
Posts: 639
Reputation: 9,549

Post » Fri May 08, 2015 2:36 am

@chrisinfinger

chrisinfinger wrote:Have you tried adding a physics behavior and using Apply force action?
Even if your not using physics in game specifically you can still enable/disable the behavior as needed.


I'm not really good with the physics behavior could you upload a capx please
B
5
S
1
Posts: 60
Reputation: 495

Post » Fri May 08, 2015 7:35 am

I don't understand any of the --- or ### , so without any further explanation I don't understand the question and as such won't be able to provide an answer..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri May 08, 2015 7:52 am

you ever heard of paint? like - use paint to draw what you need, because this doesn't explain anything.

or give us a CAPX for it.

but if i understand correctly, you want something like ping pong? use tan function to calculate new angle for the ball or whatever you are using
to rebound it.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450



Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests