Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by MicroKyrr
Well i change something.
PHP код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Float:VPOS[3];
GetPlayerVelocity(playerid, VPOS[0], VPOS[1], VPOS[2]);
SetPlayerVelocity(playerid, VPOS[0]-0.5, VPOS[1]-0.5, VPOS[2]-0.5);
}
return 1;
}
"-" means subtract. Also i almost change the whole code
|
So errmmm, what happens when we stand still? :S
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Velocity should probably only be multiplied or divided. Specifying arbitrary values is, well, arbitrary.
Posts: 2,203
Threads: 154
Joined: Oct 2009
Reputation:
0
Instead of checking for keys i would get velocity and than check if its BELOW that i want to be the fastest possible, if its is, just return/continue, if not than multiply with 0.75 or 0.8 (75 or 80% of current speed, that should slower the player)
One more way that comes to mind is scanning for keys and play RUN animations since you can set delta (animation speed). And by the way, dont touch Z velocity, just skip it, if player is falling down than it could "slower" his fall and jumping from top of the building and surviving will become possible...I guess you dont want that...
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by DRIFT_HUNTER
And by the way, dont touch Z velocity, just skip it, if player is falling down than it could "slower" his fall and jumping from top of the building and surviving will become possible...I guess you dont want that...
|
I'm actually going to be chucking this into a test script for messing with lol.