Blockland Forums > Modification Help

Add Velocity

Pages: << < (4/4)

Destiny/Zack0Wack0:

Yeah, I already tried that. It just kept pushing me the same way no matter what direction I was facing.

Truce:


--- Quote from: Destiny/Zack0Wack0 on January 10, 2011, 09:22:14 AM ---Yeah, I already tried that. It just kept pushing me the same way no matter what direction I was facing.

--- End quote ---

This works perfectly for me:


--- Code: ---function serverCmdTestOffset(%cl,%offx,%offy,%offz)
{
%pl = %cl.player;

if(!isObject(%pl))
return;

%fv = %pl.getForwardVector();
%vx = getWord(%fv,0);
%vy = getWord(%fv,1);

%pl.addVelocity(%offx * %vy + %offy * %vx SPC %offy * %vy + %offx * -%vx SPC %offz);
}

--- End code ---


Pages: << < (4/4)

Go to full version