# Mouse aim indicator HELP

Get help using Construct 2

### » Mon Aug 29, 2016 11:30 am

sooo i am trying to make an aim system for a platformer that shots only in 8 directions towerfall style i want it to be when left mouse button is down show an aim arrow indicator and when mouse button is released shot at that direction . what i don't know how to do is how to test if mouse courser is between 2 angles for a certain object (playerSprite)
B
9
Posts: 5
Reputation: 335

### » Mon Aug 29, 2016 6:03 pm

I don't know how to explain it so I made a capx.

(There was a mistake in the first one, it's 135 degrees instead of 145 degrees.)
B
12
S
7
G
4
Posts: 114
Reputation: 3,067

### » Tue Aug 30, 2016 7:19 pm

oh dang i cant open it cuz i didn't update construct 2 and i am afraid it would ruin my game . will it ?
B
9
Posts: 5
Reputation: 335

### » Wed Aug 31, 2016 12:23 pm

If your game isn't a complicated giant mess, you can update construct 2 without worries.
B
12
S
7
G
4
Posts: 114
Reputation: 3,067

### » Fri Sep 02, 2016 12:09 pm

ok a new question can you tell me when i add the condition of is withen angle .the question is withen angle in relation to what ? i am very confused if there is an angle there should be a center for that angle and i dont understand that condition very well can you explain it panda-kun ?
B
9
Posts: 5
Reputation: 335

### » Fri Sep 02, 2016 6:10 pm

sagerx wrote:ok a new question can you tell me when i add the condition of is withen angle .the question is withen angle in relation to what ? i am very confused if there is an angle there should be a center for that angle and i dont understand that condition very well can you explain it panda-kun ?

@sagerx the origin of the angle is the origin of the object used in the events. (in the example it's Splayer)
It's used in relation with the mouse cursor. (in the example mouse cursor=Sscope)

This picture can help you to understand how it works, the center is the origin of the object you use as a reference in the events. (Splayer in the example)

If you click below the object origin (X is the same but Y is bigger) the angle is 270°.

If you click top right of the object origin (X is bigger, Y is lesser) the angle is 45°.

etc...
B
12
S
7
G
4
Posts: 114
Reputation: 3,067

### » Fri Sep 02, 2016 8:11 pm

thx and sorry for being an annoyance but can you show me an example for the event ? to be 100% certain that i understand
B
9
Posts: 5
Reputation: 335

### » Fri Sep 02, 2016 9:41 pm

sagerx wrote:can you show me an example for the event ? to be 100% certain that i understand

There are events checking the mouse cursor position(Sscope) compared to the origin of the Player(Splayer) then it sets the bullet angle.
It's not just "one" event.
B
12
S
7
G
4
Posts: 114
Reputation: 3,067

### » Fri Sep 02, 2016 10:04 pm

ok i see the example ,,,,what is GVnumber ?
B
9
Posts: 5
Reputation: 335

### » Fri Sep 02, 2016 10:39 pm

The red or the blue are GVnumber. (it's a variable made to create a space to click with the cursor, not an angle)

If you set GVnumber to 0, you won't be able to shoot up right left or down.
If you set GVnumber to 80, you will only be able to shoot up right left or down.

You can play with it to see the differences, you can scale it to your object size (the example uses a 40x40pixels object)
B
12
S
7
G
4
Posts: 114
Reputation: 3,067