Author Topic: Speed of a player(Solved) Fixing states  (Read 1247 times)

how fast is the player when they are
running
walking
crouching
crouch/walk(if it's possible)

I'd just like to know those values, seeing as how my gpu is busted which means I can't play blockland

I need to make this semi automatic, but I'm not exactly sure how.
Code: [Select]
stateName[0]                      = "Activate";
stateTimeoutValue[0]              = 0.1;
stateTransitionOnTimeout[0]        = "LoadCheckA";

stateName[1]                      = "Ready";
stateTransitionOnNoAmmo[1]        = "Reload";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]          = true;

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]      = "Delay";
stateTimeoutValue[2]            = 0.1;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "fire";
stateScript[2]                  = "onFire";
stateEjectShell[2]          = false;
stateEmitter[2] = soneFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateWaitForTimeout[2] = true;
stateSound[2] = soneFireSound;

stateName[7] = "Delay";
stateTransitionOnTimeout[7]      = "FireLoadCheckA";
stateTimeoutValue[7]            = 0.02;
stateEmitter[7] = gunSmokeEmitter;
stateEmitterTime[7] = 0.01;
stateEmitterNode[7] = "muzzleNode";

stateName[8] = "LoadCheckA";
stateScript[8] = "onLoadCheck";
stateTimeoutValue[8] = 0.01;
stateTransitionOnTimeout[8] = "LoadCheckB";

stateName[9] = "LoadCheckB";
stateTransitionOnAmmo[9] = "Ready";
stateTransitionOnNoAmmo[9] = "Reload2";

stateName[10] = "Reload";
stateTimeoutValue[10] = 1.0;
stateScript[10] = "onReloadStart";
stateTransitionOnTimeout[10] = "Wait";
stateWaitForTimeout[10] = true;
stateSequence[10] = "Reload1";
stateSound[10] = soneclipOutSound;

stateName[11] = "Wait";
stateTimeoutValue[11] = 1.0;
stateSound[11] = soneclipInSound;
stateScript[11] = "onReloadWait";
stateSequence[11] = "Reload2";
stateTransitionOnTimeout[11] = "Reloaded";

stateName[12] = "FireLoadCheckA";
stateScript[12] = "onLoadCheck";
stateTimeoutValue[12] = 0.01;
stateTransitionOnTimeout[12] = "FireLoadCheckB";

stateName[13] = "FireLoadCheckB";
stateTransitionOnAmmo[13] = "Smoke";
stateTransitionOnNoAmmo[13] = "ReloadSmoke";

stateName[14] = "Smoke";
stateEmitter[14] = gunSmokeEmitter;
stateEmitterTime[14] = 0.1;
stateEmitterNode[14] = "muzzleNode";
stateTimeoutValue[14] = 0.1;
stateTransitionOnTimeout[14] = "Ready";
stateTransitionOnTriggerDown[14] = "Fire";

stateName[15] = "ReloadSmoke";
stateEmitter[15] = gunSmokeEmitter;
stateEmitterTime[15] = 0.1;
stateEmitterNode[15] = "muzzleNode";
stateTimeoutValue[15] = 0.1;
stateTransitionOnTimeout[15] = "Reload2";

stateName[16] = "Reloaded";
stateTimeoutValue[16] = 0.01;
stateScript[16] = "onReloaded";
stateTransitionOnTimeout[16] = "Ready";

//empty reload states
stateName[17] = "Reload2";
stateTimeoutValue[17] = 1.0;
stateScript[17] = "onReloadStart";
stateTransitionOnTimeout[17] = "Wait2";
stateWaitForTimeout[17] = true;
stateSequence[17] = "Reload1";
stateSound[17] = soneclipOutSound;

stateName[18] = "Wait2";
stateTimeoutValue[18] = 1.0;
stateSound[18] = soneclipIn_emptySound;
stateScript[18] = "onReloadWait";
stateSequence[18] = "Reload2";
stateTransitionOnTimeout[18] = "Reloaded";

stateName[19] = "Reloaded2";
stateTimeoutValue[19] = 0.01;
stateScript[19] = "onReloaded";
stateTransitionOnTimeout[19] = "Ready";
« Last Edit: August 05, 2012, 06:45:30 PM by The Corporation »

All these speeds are defined in the datablock
Put playerstandardarmor.dump(); in console and see them

All these speeds are defined in the datablock
Put playerstandardarmor.dump(); in console and see them
edited op.
So i could check the default player script to see this then?

So i could check the default player script to see this then?
Good luck finding it

Someone else has to dump it for you

Good luck finding it

Someone else has to dump it for you

I'm pretty sure you could just to PlayerStandardArmor.save("config/PlayerStandardArmor.cs"); or something and it would be essentially the same thing.

I'm pretty sure you could just to PlayerStandardArmor.save("config/PlayerStandardArmor.cs"); or something and it would be essentially the same thing.
he said he can't run blockland, so he can't do that.

he said he can't run blockland, so he can't do that.
He said his GPU is busted.
Doesn't mean he can't run a dedicated server

here you go
https://dl.dropbox.com/u/11058668/PlayerStandardArmor.cs
https://dl.dropbox.com/u/11058668/mDts.cs

runForce = "4320";
maxForwardSpeed = "7";
maxBackwardSpeed = "4";
maxSideSpeed = "6";
maxUnderwaterForwardSpeed = "8.4";
maxUnderwaterBackwardSpeed = "7.8";
maxUnderwaterSideSpeed = "7.8";
maxForwardCrouchSpeed = "3";
maxBackwardCrouchSpeed = "2";
maxSideCrouchSpeed = "2";

He said his GPU is busted.
Doesn't mean he can't run a dedicated server
Never thought about that.
here you go
https://dl.dropbox.com/u/11058668/PlayerStandardArmor.cs
https://dl.dropbox.com/u/11058668/mDts.cs

runForce = "4320";
maxForwardSpeed = "7";
maxBackwardSpeed = "4";
maxSideSpeed = "6";
maxUnderwaterForwardSpeed = "8.4";
maxUnderwaterBackwardSpeed = "7.8";
maxUnderwaterSideSpeed = "7.8";
maxForwardCrouchSpeed = "3";
maxBackwardCrouchSpeed = "2";
maxSideCrouchSpeed = "2";
Thanks, but how do I tell which one is when the player is walking?

I'm pretty sure that walking is determined based on the player's other speeds, and is probably about half of each.
There is no datablock value which has to do with walking.

I'm pretty sure that walking is determined based on the player's other speeds, and is probably about half of each.
There is no datablock value which has to do with walking.
well then.
This is going to take longer than expected.

May I ask what you're trying to do?

Walk speed is actually determined on the client's side. The server still has checks to make sure they're not trying to speedhack with it. I believe the normal walk value is 0.3 or 0.5, so 3/10 or 1/2 of the normal speeds.

May I ask what you're trying to do?
Weapon pack I'm working on.
When the player is walking or crouching, it's the equivalent of aiming down the sights without the sights.

Weapon pack I'm working on.
When the player is walking or crouching, it's the equivalent of aiming down the sights without the sights.
In that case you can just check the player's velocity. If they're not moving very much, make the bullet have less spread. Or: If the player is moving, add some movement to the bullets too.