forums

TNT Basic Forums > Bugs!
Changing rotation speeds while holding another button glitch
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-05-2009 05:53

Posted by:
Destro

Location:
LBC (langley British Columbia)

Find more posts by Destro

Hi, trying to make a player sprite turn faster to the left or right when pressing an 'override' button. This button has other functions which work, just the left and right are ignored.
Is this a bug or not? It runs fine the new speeds are just ignored.

If pressed (56) 'Shift; Overide speed limit, brake becomes reverse, left/right turn tighter:
if left
rotateship=rotateship-4.5
else if right
rotateship=rotateship+4.5
end if
if up then playerspeed=playerspeed+0.185
if down then playerspeed=playerspeed-0.15
end if
end if
end if 'END FLIGHT CONTROLS


'Other controls SHARED by all flightmodes

rotateship= sprite rotation (player)

if left
rotateship = rotateship-2.25
else if right
rotateship = rotateship+2.25
end if

09-07-2009 00:31

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

Why do you set the variable rotateship to the sprite's rotation, that would automatically cancel any alterations to the rotation. Shouldn't it be the other way around? (sprite rotation = rotateship)

On another note, when Shift is held, are the other left / right controls still active? That shouldn't matter, but would just make it faster than 4.5.

09-10-2009 01:11

Posted by:
Destro

Location:
LBC (langley British Columbia)

Find more posts by Destro

The sprite rotation seems to be working fine, though I tried it the other way around and it doesn't allow me to state it like that.
The shift button still lets you turn like normal, because the buttons for left and right are stated outside the big if statement (concerning which of the two flightmodes you are using, and whether you are strafing within either flightmode) so only the commands for pressing the up or down keys are stated inside the big if statement.

10-06-2009 23:24

Posted by:
Destro

Location:
LBC (langley British Columbia)

Find more posts by Destro

again, bonehead

So... I had rotateship= stated twice, and the second one was conflicting with the first. Deleting the second one made the shift button work, as in when shift is held down you can rotate faster.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.