top down shooter, rotation with mouse.

For questions about using Classic.

Post » Sat Aug 10, 2013 8:06 pm

incredible, as always!
if i had any money, id be throwing them at the screen right now out of gratitude

works flawlessly, with only ONE thing remaining:
how do i invert it?
sorry this must be really anoying and overall primitive question, but now its: move mouse right, screen turns left and vice versa..

again, sorry, its been long since i last worked with construct. i swear this was my last question about this shooter issue
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Sat Aug 10, 2013 8:21 pm

[QUOTE=clodius666]...but now its: move mouse right, screen turns left and vice versa..[/QUOTE] Hmm, that's weird. I programmed it to turn clockwise when mouse moves right, and counter-clockwise when mouse moves left. Anyway, it's pretty simple to invert it.

Replace this:
+ System: InputSystem.RelMouseX Different to 0
-> System: Add InputSystem.RelMouseX * 2 to global variable 'curRelAngle'

with:
+ System: InputSystem.RelMouseX Different to 0
-> System: Add InputSystem.RelMouseX * -1 * 2 to global variable 'curRelAngle'

By multiplying RelMouseX with -1, the values invert. -5 becomes +5, 3 becomes -3, etc.

You could use a variable that you set to +1 or -1 dependent on some user option, to let the gamer decide how to rotate.



[QUOTE=clodius666]i swear this was my last question about this shooter issue [/QUOTE] We'll see...
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Aug 10, 2013 9:20 pm

happy happy joy joy

now i have the foundation to build upon. cant thank you enough, really.

ive done a lot of ground work for this project already, sprites, art and stuff, so its nice to move it from the "eternal project" category to "somewhat possible to finish" category. as long as i can keep things simple and my ambitions low

oh and by the way, i clearly said:

"i swear this was my last question about THIS shooter issue"



clumsy english FTW...clodius6662013-08-10 21:28:11
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests