Raised This Month: $ Target: $400
 0% 

measure jumping distance, possible??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CheChin
New Member
Join Date: Feb 2005
Old 02-14-2005 , 04:00   measure jumping distance, possible??
Reply With Quote #1

I'm trying to figure out a way to do just this.
I figured it would be possible to use the jumping button to mark the start point, but have yet to figure out a way to detect the landing. If there aren't any modules that support this yet, how hard would it be to make one? There must be some sort of variable in CS that changes. I mean, sound does only play when you're on the ground, so... Hmm.. Anyone???
CheChin is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-14-2005 , 11:10  
Reply With Quote #2

you might be able to register the +jump command, get a users orgin, then somehow hook it to see if a player is on the ground, get the origin, and compare distances... but I do not know how to hook it when someone lands. I think it has somethign with like FL_ONGROUND ?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 02-14-2005 , 13:08  
Reply With Quote #3

you could hook the pfn function, vexds I think? It's in engine now. It's the function where 2 models touch each other, and you could see when the player model touches the ground.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-14-2005 , 14:28  
Reply With Quote #4

what if the ground is nto an entitiy?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-14-2005 , 22:59  
Reply With Quote #5

The world is entity 0. Anything else you could land on would be some other type of entity. It will generate a pfn_touch.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-16-2005 , 11:02  
Reply With Quote #6

better yet, use register_touch for a player, and *. When they jump, catch using pre_think, it registers HL time (get_hltime() ), and then when they laand, by the touch, it compares the two, makes sure it isnt like a frame (which means you simply havent jumped yet), and then marks the spot with a simple glowing entity, or better yet, effect.

And then it gets the distance between those points (which yo'd store), and outpu thow far you jumped.

Simple really.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-16-2005 , 18:41  
Reply With Quote #7

an example would be?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
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 19:20.


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