mouse click movement

Get help using Construct 2

Post » Tue Feb 12, 2013 9:06 am

Anyone.... please even a link to a manual discussing this or somewhere it's discussed on a thread.
I am not getting collisions to work properly. it collides but then goes through as in example posted above.
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Post » Sun Feb 09, 2014 1:47 pm

Would you not be better off using the pathfinding object now that you've got obstacles that you want the player to navigate?

What's happening is that you're clicking a location the screen and just telling the player object to go there in a straight line. There is nothing in the logic to tell them to walk around the bed in your example.

What you want to do here is use the pathfinding object and set the blue rectangle as an obstacle. Then Construct will guide the player round it for you.

As it stands, you are clicking somewhere and the player moves towards that location. The bullet motion is blocked when it reaches the EDGE of your collision rectangle. However, when you click again the player's x/y is moved BEYOND the edges of that rectangle and can carry on moving. That's why you see that bug.

Hope that helps.

By the way, that place where the file came from is well dodgy - PLEASE PLEASE PLEASE use a Dropbox or Google Drive account or similar to post files in the future. I now have to go and spyware scan etc. my computer because it installed loads of crap (not cool!).Psynaptik2014-02-09 13:57:25
B
5
S
1
Posts: 52
Reputation: 433

Post » Thu Feb 13, 2014 12:07 pm

Thanks for the tips.
I actually shelved the point and click game for now as I had another idea spin off from it that i got stuck into, but coming back to it at the end of the month.

Havok2014-02-13 12:08:42
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest