Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Very shitty example which probably won't work
  2. ;For left key only, cause I'm left handed and lazy <3
  3. Rotationspeed# = 2 ;Set what number Rotationspeed# should be
  4. Rotationaim# = 0 ;Set number for Rotationaim#, though it's going to be changed
  5. If (Rotationaim# < 0) Then Rotationaim# = 360 ;If the Y rotation of Rotationaim# is less than 0, make it 360
  6. If (Rotationaim# > 360) Then Rotationaim# = 0 ;If the Y rotation of Rotationaim# is more than 360, make it 0
  7. If (CamY < 0) Then CamY = 360 ;If the Y rotation of the cam is less than 0, make it 360
  8. If (CamY > 360) Then CamY = 0 ;If the Y rotation of the cam is more than 360, make it 0
  9. If (LeftKeyHold = True) Then ;If the left key is hold down (so it repeats)
  10.     Rotationaim# = CamY - 90 ;Set the aim for rotating to at CamY - 90
  11.     If (PlayerY > Rotationaim#) Then PlayerY = PlayerY - Rotationspeed# ;If the Player Y rotation is less than Rotationaim# (cam y rotation - 90)
  12.                                      ;(so in what direction Sonic instantly would go)
  13.                                      ;make it slowly rotate at the speed of Rotationspeed# towards Rotationaim#
  14. EndIf ;The end of this nice tale
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement