Moving aim

Get help using Construct 2

Post » Fri Aug 14, 2015 4:20 pm

Hello.
Does anyone know how to make a moving aim?
The aim-sprite\cursor is bound to mouse XY coordinates and the player's angle is also bound to mouse, but I need this - when player moves in any direction, the aim-sprite also should move with the player like it is in Hotline Miami, for example.
B
6
S
1
Posts: 17
Reputation: 475

Post » Fri Aug 21, 2015 7:55 pm

up
B
6
S
1
Posts: 17
Reputation: 475

Post » Sat Aug 22, 2015 2:47 am

Um, have you done the Beginner tutorial? I'm pretty sure it covers what you're trying to do.
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Sat Aug 22, 2015 3:48 am

Usman Haq wrote:Um, have you done the Beginner tutorial? I'm pretty sure it covers what you're trying to do.

The beginner tutorial does not cover that case. It simply bounds sprite to mouse coordinates.
Here is the video of what I want.
https://youtu.be/uFU63VN26EM
B
6
S
1
Posts: 17
Reputation: 475

Post » Sat Aug 22, 2015 5:37 am

Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Sat Aug 22, 2015 8:24 am



This is not what I need, please watch the video I posted above to understand what I meant.
But thanks for the effort though.
B
6
S
1
Posts: 17
Reputation: 475

Post » Sat Aug 22, 2015 12:51 pm

Well, the reticle being bound to mouse XY is going to keep it locked there; trying to make it move with the player would basically mean trying to move the mouse cursor with the player, which I don't think is possible with a browser-based game system.

One simple way of pulling it off would be to keep the character centered at all times (scroll to) and make sure that the layout itself is always allowed to scroll (basically, you need to prevent the player from reaching the edge of the layout).

You end up with this: http://superstickman.com/movingreticle/
B
27
S
5
G
1
Posts: 62
Reputation: 2,367

Post » Sat Aug 22, 2015 5:42 pm

Mike Mead wrote:One simple way of pulling it off would be to keep the character centered at all times (scroll to) and make sure that the layout itself is always allowed to scroll (basically, you need to prevent the player from reaching the edge of the layout).


Yeah, seems like there is no other way.
Thanks
B
6
S
1
Posts: 17
Reputation: 475


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests