AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   new block for blockmaker help (https://forums.alliedmods.net/showthread.php?t=75662)

spikeyoass 08-09-2008 19:51

new block for blockmaker help
 
I'm trying to create a new block for necro's bm, I've already create a few new blocks but I can't get one of the blocks to work. I want the block to return the user velocity. e.g. you jump off a high platform, you bounce back as high as you jumped.

this compiles but it won't work:

Code:

        new Float:velocity[3], Float:origin[3], Float:oFar[3], Float:oRetNormal[3];
        entity_get_vector(id, EV_VEC_velocity, velocity);
        entity_get_vector(id, EV_VEC_origin, origin);
        oFar[0] = origin[0] + (velocity[0] * 8192.0);
        oFar[1] = origin[1] + (velocity[1] * 8192.0);
        oFar[2] = origin[2] + (velocity[2] * 8192.0);
        trace_normal(id, origin, oFar, oRetNormal);
        velocity[0] = -2.0 * (velocity[0]*oRetNormal[0])*oRetNormal[0] + velocity[0];
        velocity[1] = -2.0 * (velocity[1]*oRetNormal[1])*oRetNormal[1] + velocity[1];
        velocity[2] = -2.0 * (velocity[2]*oRetNormal[2])*oRetNormal[2] + velocity[2];


Jon 08-10-2008 18:11

Re: new block for blockmaker help
 
In blockmaker your speed is reversed when you come out of a teleport. Have a look at that (line 2170).

spikeyoass 08-11-2008 17:38

Re: new block for blockmaker help
 
not quite sure how to convert that over to the new block, kinda new to coding


All times are GMT -4. The time now is 05:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.