Layers Angle, Mouse and Hero.

Get help using Construct 2

Post » Sun Jun 14, 2015 2:34 pm

This would be the closest you get, but it seems weird to me:

https://dl.dropboxusercontent.com/u/485 ... le270.capx

All calculations are done before returning the player back to it's 270 angle
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 » Sun Jun 14, 2015 2:40 pm

@LittleStain
You want the player to move towards the mouse, but the player shouldn't turn towards the mouse?


He should.

What if the mouse is not right in front of the player or even in the back of the player?


It's doesnt really matter when mouse will be, if you mean layers. But for comfort - mouse always have to be focused on one x-position. Like in FPS games, but despite FPS games - y-position will be changeable. I'm sure - Mouse Lock will help here.

Should the player move backwards?


Yes, he should. As i said - there is button "S" for that. Player will just move backwards, left/right from mouse. There is no problem with that.
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Sun Jun 14, 2015 2:42 pm

@LittleStain

This looks exactly how i tried to create this -_-
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Sun Jun 14, 2015 2:50 pm

XpMonster wrote:@LittleStain

This looks exactly how i tried to create this -_-


So this is not what you want?

You want the player to turn towards the mouse, but stay at 270 degrees..?
How is this supposed to happen..?
You should turn, but you can't turn..?
I'm probably missing something essential here..
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 » Sun Jun 14, 2015 3:02 pm

@LittleStain

When i came up with this - i'll be honored to show you an example :)

And you did helped me anyway!

When i tried explain this to you - i finally realized how this should look.
Now it's no more a matter of imagination, but realisation.
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Sun Jun 14, 2015 5:33 pm

@LittleStain just a picture of what i want.

Image

This will make player feel yourself more closer to the game. A lot more atmosphere from this. The benefits are endless.
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Sun Jun 14, 2015 6:32 pm

@LittleStain

Can you make hero and layout rotate toward mouse?
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Sun Jun 14, 2015 6:39 pm

XpMonster wrote:@LittleStain

Can you make hero and layout rotate toward mouse?


just add a - to the set layer 1 angle in my first capx example

so set layer 1 angle = -angle(Player.X,Player.Y,mouse.X,mouse.Y)
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 » Sun Jun 14, 2015 7:00 pm

@LittleStain

Thanks!
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Previous

Return to How do I....?

Who is online

Users browsing this forum: DharmaOne and 21 guests