Raised This Month: $51 Target: $400
 12% 

Detect player stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-12-2009 , 14:44   Detect player stuck
Reply With Quote #1

How to detect if player stuck in wall or in other generic objects like boxes,ground..etc.. ?
__________________
xbatista is offline
Send a message via Skype™ to xbatista
urMom
Junior Member
Join Date: Aug 2007
Old 12-13-2009 , 17:26   Re: Detect player stuck
Reply With Quote #2

Not having the actual info in front of me, but I would think you could detect player movement commands such as "forward" and compare the change in position for that client command accordingly.

To rephrase, if the player issues a movement command for horizontal movement, but their position does not change, they may be stuck.

Clearly, other checks may need to happen also, like they may be in a corner and cannot move but are not really stuck, they may be falling, or they may be in a vehicle which they do not have freedom to move.

I have seen other plugins in play which usually use collision groups to manage stuck players.

Not the exact answer you are looking for, sorry.
urMom is offline
API
Veteran Member
Join Date: May 2006
Old 12-13-2009 , 20:46   Re: Detect player stuck
Reply With Quote #3

You could do a trace from your origin to a VERY short distance and if it hits the world they are stuck.
__________________
API is offline
Send a message via AIM to API
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-13-2009 , 22:38   Re: Detect player stuck
Reply With Quote #4

You can do a tracehull, but I'm sure the questionn has already been asked in this forum.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-14-2009 , 08:52   Re: Detect player stuck
Reply With Quote #5

I read all posts , I don't have idea how to do it, I'm super bad at maths :/
__________________
xbatista is offline
Send a message via Skype™ to xbatista
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 03:38.


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