SOLID: Force mouse sprite to bounce/NOT pass?

Get help using Construct 2

Post » Thu Jan 23, 2014 3:28 pm

Ok let me try to explain why what you want to do isn't easy..

You want the sprite to be at mouse.x, mouse.y all the time, except when the mouse is overlapping the egg.

So you are going to have to tell the sprite what to do when the mouse is overlapping the egg. This is the hard bit, because you want it to follow the mouse, but it can't because the mouse is overlapping the egg. So you have tto tell the sprite how to follow the mouse, without overlapping the egg.

if you want to click somewhere and have the sprite go there you can use the pathfinding behaviour and it will go around the egg no problem.

But you choose to have the sprite at the mouse, so it's pretty hard to tell the sprite what to do when that is impossible.

So If you can find a simple way to explain in normal language where you want the sprite to be when the mouse is overlapping the egg and how to react when the mouse is no longer overlapping the egg, maybe than there is an easier way to explain it to the computer too.
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 » Thu Jan 23, 2014 3:29 pm

BTw: the egg.capx was from @justifun and not me.
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 » Thu Jan 23, 2014 4:22 pm

Any Good ?

edit - Basically the same as @justifun s but using bullet behaviour. Variable ball speed to make it go faster the further it is from the mouse and slow to a stop over mouse. Ball speed will cut to zero on contact with the egg to stop bounce.RamPackWobble2014-01-23 16:25:22
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Dec 14, 2014 8:08 pm

ive got the same problem, but with all of the walls im trying to use.. i cant for the life of me find a solution.. with the mouse cursor actually being that responsive...
B
5
Posts: 15
Reputation: 259

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests