Raised This Month: $ Target: $400
 0% 

new block for blockmaker help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spikeyoass
Junior Member
Join Date: Jul 2008
Old 08-09-2008 , 19:51   new block for blockmaker help
Reply With Quote #1

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];
spikeyoass is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 08-10-2008 , 18:11   Re: new block for blockmaker help
Reply With Quote #2

In blockmaker your speed is reversed when you come out of a teleport. Have a look at that (line 2170).
Jon is offline
spikeyoass
Junior Member
Join Date: Jul 2008
Old 08-11-2008 , 17:38   Re: new block for blockmaker help
Reply With Quote #3

not quite sure how to convert that over to the new block, kinda new to coding
spikeyoass is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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