Author Topic: playertype that "dodges" in whichever direction you're moving instead of jets  (Read 2894 times)

i'd like to have something where when you jet, your character does a hop / dash / some form of quick movement in whichever direction you're moving, and a stamina bar or something that only lets you dodge 4 times in succession and recharges after not dodging for like, 2 seconds or something

if it's not too much trouble, could their be a version where you also tumble in the direction? and if possible, automatically go back to not being tumbled after the duration ends

it'd be cool to give melee deathmatches another form of movement to make them a little more exciting
the tumble version would just be for making silly videos or something
« Last Edit: July 09, 2016, 04:49:10 PM by kongo »


This really seems like a cool idea.


I have something like this as an experimentation, but it does not feel very right.
Though, i have tried to not use the right click (so that weapons can use it) but instead used the jump button.
It might have to do with it.
But mostly i think, it has to do with the way we can detect where you are going.
In most games that have this mechanic, they probably read out if you press left and/or right and/or forward.
But in this game, if you want to avoid a client side of the mod, we will have to do with the direction the player is moving in.
Which is not always as accurate.
I am gonna see if i can pump out a good working version for you sometime soon.
If anyone else wants to do it, go ahead, you will probably be done faster then i am. :P

I have something like this as an experimentation, but it does not feel very right.
Though, i have tried to not use the right click (so that weapons can use it) but instead used the jump button.
It might have to do with it.
But mostly i think, it has to do with the way we can detect where you are going.
In most games that have this mechanic, they probably read out if you press left and/or right and/or forward.
But in this game, if you want to avoid a client side of the mod, we will have to do with the direction the player is moving in.
Which is not always as accurate.
I am gonna see if i can pump out a good working version for you sometime soon.
If anyone else wants to do it, go ahead, you will probably be done faster then i am. :P
ok cool. Despite the fact use used the words "client sided," will it be that way? because it will be like a cheat on some servers. I'd reccommend a server addon for it to be controlled by admins.

I did not really explain that i am trying to do this without client mod to add keybindings or anything like that.
Just a server-based mod.
There would not be anything to be able to cheat with anyway, even if i did go the client-sided part way. >_<
Anyhow, not using a client script or anything, that was just some thoughts on the matter.


resonte has this on his 100 room trial server

resonte has this on his 100 room trial server
it's basically the sports playertype but kicked up several notches

i haven't tested it but i quickly packaged it

it's basically the sports playertype but kicked up several notches

i haven't tested it but i quickly packaged it
From just reading the code, it just makes the player faster?
I think the intended effect is to not move faster, but to move really quickly to another location.

AKA we're in position A, we dash, suddenly in position B after the press of a button
Not, we're in position A, we dash, gain speed to reach position B quicker.

From just reading the code, it just makes the player faster?
I think the intended effect is to not move faster, but to move really quickly to another location.

AKA we're in position A, we dash, suddenly in position B after the press of a button
Not, we're in position A, we dash, gain speed to reach position B quicker.
eh.

i just saw bushido mention the playertype and okay well for the reference to make sense you have to "experience" it

i am going to bring this back

because i saw an item that does something from the player_swiftdragon




Quote
   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.1;
   stateTransitionOnTimeout[0]       = "Ready";
   stateSound[0]               = weaponSwitchSound;

   stateName[1]                     = "Ready";
   stateTransitionOnTriggerDown[1]  = "Fire1";
   stateAllowImageChange[1]         = true;
//   stateTransitionOnNoAmmo[1]       = "NoAmmo";
//   stateSequence[1]   = "Ready";

   stateName[2]                    = "Fire1";
   stateTransitionOnTimeout[2]     = "Fire";
   stateTimeoutValue[2]            = 0.2;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateScript[2]                  = "onFire1";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]               = SwiftBoostWindEmitter;
   stateEmitterTime[2]            = 0.35;      //0.4
   stateEmitterNode[2]            = muzzlePoint;
//   stateSound[2]               = rocketFireSound;

   stateName[3]                    = "Fire";
   stateTransitionOnTimeout[3]     = "Recharge";
   stateTimeoutValue[3]            = 0.7;
   stateFire[3]                    = true;
   stateAllowImageChange[3]        = false;
   stateScript[3]                  = "onFire";
   stateWaitForTimeout[3]         = true;
//   stateEmitter[3]               = rocketLauncherFlashEmitter;
//   stateEmitterTime[3]            = 0.05;
//   stateEmitterNode[3]            = tailNode;
//   stateSound[3]               = rocketFireSound;

   stateName[4]               = "Recharge";
   stateTransitionOnTimeout[4]      = "Ready";
   stateTimeoutValue[4]         = "1.9";
   stateAllowImageChange[4]      = true;
   stateScript[4]               = "onRecharge";

};

function SwiftBoostImage::onFire1(%this,%obj,%slot)
{
   if((%obj.lastFireTime+%this.minShotTime) > getSimTime())
      return;

//   %obj.lastFireTime = getSimTime();

  %fvec = %obj.getForwardVector();
  %fX = getWord(%fvec,0);
  %fY = getWord(%fvec,1);
 
  %evec = %obj.getEyeVector();
  %eX = getWord(%evec,0);
  %eY = getWord(%evec,1);
  %eZ = getWord(%evec,2);
 
  %eXY = mSqrt(%eX*%eX+%eY*%eY);
 
  %aimVec = %fX*%eXY SPC %fY*%eXY SPC %eZ;

   %obj.setVelocity(VectorAdd(%obj.getVelocity(),VectorScale(%aimVec,"10")));

   %obj.playThread(2, boost);

//   MissionCleanup.add(%p);
//   return %p;

}

function SwiftBoostImage::onFire(%this,%obj,%slot)
{
   if((%obj.lastFireTime+%this.minShotTime) > getSimTime())
      return;

   %obj.lastFireTime = getSimTime();

  %fvec = %obj.getForwardVector();
  %fX = getWord(%fvec,0);
  %fY = getWord(%fvec,1);
 
  %evec = %obj.getEyeVector();
  %eX = getWord(%evec,0);
  %eY = getWord(%evec,1);
  %eZ = getWord(%evec,2);
 
  %eXY = mSqrt(%eX*%eX+%eY*%eY);
 
  %aimVec = %fX*%eXY SPC %fY*%eXY SPC %eZ;

   %obj.addVelocity(VectorAdd(%obj.getVelocity(),VectorScale(%aimVec,"3")));   //10


//   MissionCleanup.add(%p);
//   return %p;

}

function SwiftBoostImage::onRecharge(%this,%obj,%slot)
{
   %obj.playThread(2, root);

}

the difference is that its an item of course but also it boosts you in the direction you are looking as well

i don't really know much about it but maybe it's code can be used somehow? anything helps i suppose

That is in the direction you are looking, not the direction you are moving in.


i don't want to sound pushy but is there any word on when this could be done?