Author Topic: [v3] Click Turn  (Read 9050 times)

Updated to v2.1
A small update that removes the console spam. Code is also more clean, but it shouldn't matter at all.
The add-on is now hosted on my website instead of dropbox, so please re-download!

EDIT: currently working on a dl-counter for the site, you might see it going up and down a lot.

EDIT2: done, the site will now count downloads.
« Last Edit: May 08, 2013, 07:33:36 PM by Subpixel »

$ClickTurn_Left = ($ClickTurn_Left == 1) ? 0 : 1; could just be $ClickTurn_Left = !$ClickTurn_Left;

$ClickTurn_Left = ($ClickTurn_Left == 1) ? 0 : 1; could just be $ClickTurn_Left = !$ClickTurn_Left;
I guess I can do that, does it make any difference?

I guess I can do that, does it make any difference?
It's not needlessly complicated

So I must have downloaded this at one point because I found some sort of drunk code added on to it on my desktop today. It was as such:

//bitch watch this stuff

$BitchforgetTurnSpeed="0.1";
$forgetstuff=0;

function MotherforgeterTurn_Left()
{
   if($forgetstuff != 0)//if the loving stuff is on
   {
      $mvyawleftspeed=0;//then loving stop that stuff
      $forgetstuff=0;//tell the function's bitch-ass parents to go forget themselves
      $bitchforgetturnspeed="0.1";
      return;//now get the forget out of there
   }   
   else//Is that stuff off?
   {//yeah?
      $mvyawleftspeed="0.1";//then turn that loving stuff on
      $forgetstuff=1;//set the next function up the bomb
   }//close the loving door
}//you pig

function MotherforgeterTurn_OtherLeft()
{
   if($forgetstuff != 0)
   {
      $mvyawrightspeed="0";
      $forgetstuff=0;
      $bitchforgetturnspeed="0.1";
      return;
   }
   else
   {
      $mvyawrightspeed="0.1";
      $forgetstuff=2;
   }
}

function SpeedTheforgetUpfriend()
{
   if($forgetstuff != 1 && $forgetstuff != 2)//Bitch isn't spinning?
   {
      return;//oh my god friend what the forget are you trying to speed up? get the forget out of this function.
   }
   else if($forgetstuff = 1)//is that motherforgeter spinning left?
   {//yeah?
      $BitchforgetTurnSpeed+=0.1;//Speed that loving piece of stuffforget up
      $mvyawleftspeed="" @ $BitchforgetTurnSpeed @ "";//spin you forget, spin.
   }//get the forget out of this section of the function
   else if($forgetstuff = 2)//forgeter must be spinning to the other left
   {//knock knock
      $BitchforgetTurnSpeed+=0.1;//who's there?
      $mvyawrightspeed="" @ $BitchforgetTurnSpeed @ "";//get the forget out of this function
   }//get the forget out of this function who?
}//you

function WhatTheforgetfriendSlowDown()
{
   if($forgetstuff != 1 && $forgetstuff != 2)//This forgeter better be spinning
   {
      return;//oh wow what a friend
   }
   else if($BitchforgetTurnSpeed <= 0.1)//is this motherforgeter trying to slow down passed the slowest setting?
   {//holy stuff
      return;//what a friend
   }
   else if($forgetstuff = 1)//forgeter goin left?
   {
      $BitchforgetTurnSpeed-=0.1;//slow the forget down
      $mvyawleftspeed="" @ $BitchforgetTurnSpeed @ "";//forget stuff ass tits
   }
   else if($forgetstuff = 2)//not left? forget you there is only left
   {
      $bitchforgetturnspeed-=0.1;
      $mvyawrightspeed="" @ $bitchforgetturnspeed @ "";
   }
}
   
function lazybrodudenah(%feh)
{
   if(%feh != 0)
   {
      return;
   }
   else
   {
      $mvyawleftspeed="0";
      $mvyawrightspeed="0";
   }
}
   

function SpeedHackTurnAround()
{
   if($forgetstuff != 0)
   {
      return;
   }
   else
   {
      $mvyawleftspeed="10";
      schedule(30,0,lazybrodudenah,0);
   }
}

$remapDivision[$remapCount] = "Spin stuff";
$remapName[$remapCount] = "Turn Around Better";
$remapCmd[$remapCount] = "SpeedHackTurnAround";
$remapCount++;

$remapName[$remapCount] = "Spin Left Toggle";
$remapCmd[$remapCount] = "MotherforgeterTurn_Left";
$remapCount++;

$remapName[$remapCount] = "Spin Right Toggle";
$remapCmd[$remapCount] = "MotherforgeterTurn_OtherLeft";
$remapCount++;

$remapName[$remapCount] = "Spin Speed Increase";
$remapCmd[$remapCount] = "SpeedTheforgetUpfriend";
$remapCount++;

$remapName[$remapCount] = "Spin Speed Decrease";
$remapCmd[$remapCount] = "WhatTheforgetfriendSlowDown";
$remapCount++;


I don't exactly remember writing this. I took out some of the comments that were too ugly. Hmph. There's my story for the day.



Also its not a full 180 degrees, it goes less than that when you use the turn around.

Also its not a full 180 degrees, it goes less than that when you use the turn around.

$mvYaw = $pi;


No idea how I would implement that.
Instead of
   turnRight(1);
   schedule(205,0,turnRight,0);


Replace it with $mvYaw = $pi;

Updated to v3.
I've removed the left/right keybinds, i've decided to keep this add-on all about the turn-around feature.

Download

How does a script that adds a keybind keep getting bumped?
And so nobody uses this against me, it was on the first page.

moveMap.bindCmd("keyboard", "p", "$mvYaw = $pi;");

^ there, turn around keybind

moveMap.bindCmd("keyboard", "p", "$mvYaw = $pi;");

^ there, turn around keybind
That makes you spin 360 degrees.