Raised This Month: $ Target: $400
 0% 

Surfing detection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 11-08-2007 , 18:29   Surfing detection
Reply With Quote #1

Does anyone know the way to detect sliding (or surfing) down the slope? I was hoping to get something out from entity flags, but there's no difference between the state where player is just in air (like during a jump) and the sliding.

Someone able to help?

Regards

A
__________________
alien is offline
Send a message via ICQ to alien
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-08-2007 , 18:30   Re: Surfing detection
Reply With Quote #2

Check when they touch a func_friction or whatever the classname is, can't remember now.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-08-2007 , 18:34   Re: Surfing detection
Reply With Quote #3

If that doesn't work...just logically thinking...you could test to see if they have velocity, make sure they are on ground, and check if they are not pressing any movement buttons

If I remember correctly, you have to hold in buttons to surf though. So you'd have to compare the buttons to which direction and velocity and agh...

Actually re-reading what you're saying...if the entity flags say he is in air when he is jumping, just do a trace-hull of a slightly larger space and see if you hit any ground.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 11-08-2007 , 18:51   Re: Surfing detection
Reply With Quote #4

Hawk552: Touch might work with func_friction thing but this is more about world brushes with slope faces (> 45 degrees I think). You can't stand or walk on them. As soon as you touch one, entity flag will change to 8 (which is exactly the same value as during falling).

Wilson: Whatever player is pressing and his speed is will not help in distinguishing falling state from sliding. But trace_hull idea sounds interesting. I'll be right back.

Thank you both.

UPDATE:

Trace_hull with with large_hull almost did the job. But then I've noticed that the states where player is in the air + ducked + few units above ground and the state when player is touching a brush (possibly slope) + is above ground are identical in the engine. So another problem - and I don't see a way through trace_hull anymore. This problem is more complicated than I expected.

I possibly have a solution but that includes a bit of vector algebra ... and lot of optimalisations.
Garh >_<
__________________

Last edited by alien; 11-08-2007 at 19:27.
alien is offline
Send a message via ICQ to alien
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 01:12.


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