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

Finding if bullet hits water?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-27-2004 , 02:28   Finding if bullet hits water?
Reply With Quote #1

How would I go about finding if a bullet hit a func_water in a map?

I'd like to recreate the splash effect seen in counterstrike:source.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-27-2004 , 05:35  
Reply With Quote #2

hmm that could be hard...

I don't think bullets are always entities, you would have to hook TraceLine then... Would be best to do in a metamod plugin :]
__________________
hello, i am pm
PM is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-27-2004 , 07:30  
Reply With Quote #3

Damn...burst my bubble.

I thought the effect was cool on counter-strike:source vid, and I was thinking, what better way to proove AMX is great than by replicating these things?

Maybe bailo or you PM would know how to do it in AMX?...or make it possible?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
ts2do
Senior Member
Join Date: Mar 2004
Old 05-27-2004 , 10:10  
Reply With Quote #4

of course its not only func_water u want....maybe theres a way to test if a point is in water (PointContents?) coz if so u can make it check every few frames or so and spew a bubble at that time
ts2do is offline
Send a message via AIM to ts2do
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-27-2004 , 11:12  
Reply With Quote #5

hmm yes you could maybe find out when the player's weapon shoots a bullet and do traceline on his aiming and do your effects :]
__________________
hello, i am pm
PM is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 05-27-2004 , 19:43  
Reply With Quote #6

i think it would look a little weird though.
__________________
QwertyAccess is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-27-2004 , 20:12  
Reply With Quote #7

Qwerty, it would be easy to work with...

Calculate if the angle is so much, if its almost horizontal angle, then do a sprite, if not, dont.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-28-2004 , 06:04  
Reply With Quote #8

k I have been thinking about this a bit... You could probably check the sequence and frame of the client's current weapon. If it is the shoot sequence and the thing shoots a bullet, you could do some effects. But: a) the weapons in CS don't always shoot in player's aim direction (for example para on fullauto ) and watch out for kinfe xD
__________________
hello, i am pm
PM is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-28-2004 , 06:31  
Reply With Quote #9

haha, I got PM interested in something.

Is there a way to trace where a bullet HITS? and not just the aiming?

It could be useful for perhaps adding custom decals to walls, instead of using default decals, server could use their own...?

And also doing that water effect. If it could return what texture an object hit has, and the hitpoint?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
ts2do
Senior Member
Join Date: Mar 2004
Old 05-28-2004 , 10:35  
Reply With Quote #10

ya get_user_origin has an option to get hit point
ts2do is offline
Send a message via AIM to ts2do
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 10:36.


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