Page 1 of 1

What a drip!

Posted: Mon Jun 02, 2003 10:25 pm
by tltrude
I have been trying to make a drip tiki file because the one in the game doesn't work. Getting the drop of water to fall was no problem, but making it interact with a water brush (spawn rings on the surface) is making my head swim.

I tried to make the drop a bullet, but that failed. I tried using the ring shader (in the effects shader) as a decal, but that just made a white flashing ring at the bottom of the pond. So now I am trying to spawn the bullet hit rings, but with no luck so far. Below is my current effort.

Code: Select all

TIKI
setup
{
	scale 1.0
	path models/fx/dummy
	skelmodel dummy3.skd
}

init
{
	server
	{
		classname Animate
		notsolid
		rendereffects +dontdraw
	}
	client
	{
		cache models/fx/water_splash_drop.tik
		cache models/fx/bh_water_lite.tik
		aliascache drip_hit_water sound/weapons/impact/wpn_impwater08.wav soundparms 0.3 0.2 0.9 0.2 128 1024 auto loaded maps "m dm moh obj train"

		originemitter water_drip
		(
			model models/fx/water_splash_drop.tik
			spritegridlighting
			life 1.2
			randvel 0 0 range -200 -225
			alignstretch 0.125
			randomroll
			scale 2.6
			scalerate .1
			count 1
			bouncefactor 0
			alpha 1
			color 0.9 0.9 1.0
			offsetalongaxis crandom 2 crandom 2 crandom 2
			spawnrate 1
			collision [?water?]
			fade
		)

		sfx originspawn
		(
			model models/fx/bh_water_lite.tik
			spritegridlighting
			life 0.6
			scale 1
			scalerate .1
			count 1
			spawnrate 1
			collision
		}
	}
}

animations
{
        idle dummy3.skc
	start dummy3.skc
	{
		client
	        {
			enter emitteron water_drip
			enter playsound drip_hit_water
	        }
	}
	stop dummy3.skc
	{
		client
	        {
	    		enter emitteroff water_drip
		}
	}
}

/*QUAKED fx_tom_drip (0.0 0.5 0.5) (-8 -8 -8) (8 8 8)
Water drip from ceiling, no sound, no splash
*/
I found MOH Client Commands Reference Guide in the Spearhead sdk and it has this:

collision [?water?] Turns on collision for the tempmodels (saves CPU if you don?t need collision ). Add the water keyword if you want the particles to collide with water.

But, I don't think I am adding the keyword right because the drop just goes all the way to the bottom of the pond--if I don't fade it, or shorten it's life. The sound doen't work either.

Any ideas, on how to stop my head from spinning like a top, would be very useful!

Posted: Tue Jun 03, 2003 4:24 am
by bdbodger
Did you look in pak1.pk3/models/human/animation/scripted/rowboat.tik
here is part of it .
client
{
tagemitter tag_ripple01 ring
(
startoff
spawnrate 10
model waterRing.spr
life 10
scalerate 1
offset crandom 2 crandom 2 0
angles 90 0 crandom 180
avelocity 0 0 crandom 40
scalemin 0.08
scalemax 0.13
fade
)

tagemitter tag_ripple02 ring ..........

Posted: Tue Jun 03, 2003 8:33 am
by jv_map
Probably 'dietouch' will make your drip disappear when it hits the water.

For the rings on the water you could always make a very carefully timed particle effect, like the one bdbodger posted. You could control it from the script.

dietouch

Posted: Tue Jun 03, 2003 11:16 am
by tltrude
I already tried dietouch and the drip still goes to the bottom of the pond to die.

I am not making this for a map I'm working on, I would rather it worked for any map people may want to use it for. That rowboat one is interesting, but it may be just for Spearhead and I still can't figure out how it knows the oars are hitting the water. It has a couple of lines worth trying:

rendereffects +growradius
and
10 emitteron ring

I assume the number 10 is the number of frames and I haven't seen that in mohaa tiki files yet.

Posted: Tue Jun 03, 2003 11:22 am
by jv_map
10th frame of the animation. Very common also in mohaa tikis, although sometimes first, entry or last is used instead.

last

Posted: Tue Jun 03, 2003 11:25 am
by tltrude
last would work, if I could get it to stop at the water surface. Do you think "collisionwater" is how it should be written?--I think I tried that.

Posted: Tue Jun 03, 2003 12:10 pm
by jv_map
collision "water" I think.