Game Development Community

dev|Pro Game Development Curriculum

mouseFire Modifier

by Jeremy Alessi · 08/16/2005 (2:21 pm) · 0 comments

Go into your default.bind.cs file under

your.game/client/scripts

At about line 59 inside the moveForward function Add:

$moveForeStatus = %val;

Then down around line 135 change the mouseFire function to look like this:

function mouseFire(%val)
{
   if ($moveForeStatus > 0)
   {
      if (%val > 0)
         $mvAttackType = 0;
         $mvTriggerCount0++;
   }
   else
   {   
      $mvTriggerCount0++;
      $mvAttackType = 2;
   }
}

The global variable $mvAttackType can then be fed to something like the Realm Wars melee code to alter your attack type depending on the direction you are pressing (or aren't pressing).