Raised This Month: $ Target: $400
 0% 

Detect entity in water


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-07-2014 , 14:09   Detect entity in water
Reply With Quote #1

Like the title said, I want to know how to detech any entity if it in water or not.
Please help
Thanks

Last edited by RateX; 08-08-2014 at 05:25.
RateX is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 08-07-2014 , 14:33   Re: Detech entity in water
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=79335
__________________
Hey ^_^
NikKOo31 is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-08-2014 , 01:11   Re: Detech entity in water
Reply With Quote #3

Tested in as_oilrig. The code only works for player
RateX is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-08-2014 , 02:27   Re: Detech entity in water
Reply With Quote #4

Play with pev_waterlevel. I checked SmokeGrenade's decompiled code and it check if it's underwater with the waterlevel entvar
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-08-2014 , 06:22   Re: Detech entity in water
Reply With Quote #5

Quote:
Originally Posted by meTaLiCroSS View Post
Play with pev_waterlevel. I checked SmokeGrenade's decompiled code and it check if it's underwater with the waterlevel entvar
Surprisingly, it works. Thanks meTaLiCroSS
Kinda weird 'cause it only return value 0 and 3. Guess the other values are only for player
RateX 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 12:55.


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