Water?
Posted: Wed Mar 17, 2004 6:32 pm
I really want water in Mohaa, where you can actually float in and so that you can die if you stay under too long.
Is this possible?
Is this possible?
Ahh, cool, I guess my mistake was not having 'nodraw' on the other four faces. In fact, my brush might not have had six faces, it might have been a wedge shape. Is that allowable?tltrude wrote:The water brush should have texture on the top and bottom faces with nodraw on the other four faces. Doing that makes it a water voulme and, when your head is under the surface, the screen will squirm around a bit.
Ahh, I guess this is what omniscient was trying to tell me!kai0ty wrote:mohaa wont allow u to be submereged in water unles u fall in it. check that in omaha it'l force u back up if u become submerged. also if u try to crouch while the water is high up its will say u cant go in water.
wha ti mean is u cant completely submerge yourself in water withought falling in it. it wont go above ur head if u just walk in.dcoshea wrote:What do you mean, you can't walk in water, you can only fall? As far as I know, when you make water like in Omaha beach, it's just a brush which has a water texture on the top and a land texture on the bottom (the sea floor), and the brush is not solid but you can't move as fast while you're in it. I'm pretty sure you can still walk in it - I think I've done this on a custom map I made. I do seem to remember that when you're completely submerged it doesn't really look like you're under water - not like it does in Quake. You can still see perfectly well through it.
Regards,
David
I was able to do that, though, in Spearhead anyway. See my previous post. It wouldn't let me duck once I'd walked in so it definitely knew I was inside a water brush, but perhaps I stuffed it up somehow. I'm not a mapper hehehkai0ty wrote:wha ti mean is u cant completely submerge yourself in water withought falling in it. it wont go above ur head if u just walk in.dcoshea wrote:What do you mean, you can't walk in water, you can only fall? As far as I know, when you make water like in Omaha beach, it's just a brush which has a water texture on the top and a land texture on the bottom (the sea floor), and the brush is not solid but you can't move as fast while you're in it. I'm pretty sure you can still walk in it - I think I've done this on a custom map I made. I do seem to remember that when you're completely submerged it doesn't really look like you're under water - not like it does in Quake. You can still see perfectly well through it.
Regards,
David
Code: Select all
//***********************************************************
//*** death_water script
//*** modifed version of the MOHAA minefield
//*** modifed by Duncan Weir May 2002
//*** The player enters the water, and within 15 secs
//*** if he's still in the water he'll start to drown.
//
//*** This main thread is called by this script and should not be called by the
//*** level script itsself. The level script should call deathwater_setup
//*** syntax ------------------------------------
//*** deathwater <this is the index number for the array of deathwater triggers>
// script_object -> trigger multiple
// targetname = deathwater
// #startdrowntime = set to number of seconds a player can be in the water before drowning starts // default 10
// #timetodrown = set to number of seconds a player takes to drown // default 10
//***********************************************************
deathwater local.index:
thread debugtext ("THREAD: deathwater = " + local.index)
if ($deathwater[local.index].startdrowntime == NIL)
local.startdrowntime = 10
else
local.startdrowntime = $deathwater[local.index].startdrowntime
if ($deathwater[local.index].timetodrown == NIL)
local.timetodrown = 10
else
local.timetodrown = $deathwater[local.index].timetodrown
local.radius = 40 // radius of the damage - only in local player area
thread debugtext (" Radius = " + local.radius)
local.damage = 100 / local.timetodrown // calculate how much damage per second
thread debugtext (" Damage = " + local.damage)
deathwater_loop:
thread debugtext "THREAD: deathwater_loop"
$deathwater[local.index] waittill trigger // wait till this field is triggered
local.sucker = parm.other // gets the player info
thread debugtext " deathwater triggered"
thread debugtext (" local.sucker = " + local.sucker)
wait ( local.startdrowntime ) // wait a set amount of time before starting to drown
deathwater_drown_loop:
if (local.sucker istouching $deathwater[local.index] == 1) // check player is still in the deathwater
{
thread debugtext " Player is drowning"
// local.spawn_drown = (local.sucker.targetname + "_drown")
// spawn animate/fx_mortar_water targetname local.spawn_mine
// local.spawn_drown = $(local.sucker.targetname + "_drown")
// local.spawn_drown.origin = local.sucker.origin
// local.spawn_drown anim start
// local.spawn_drown playsound grenade_exp_water
radiusdamage local.sucker.origin local.damage local.radius
wait 1 // wait 1 second
// local.spawn_drown remove //*** remove the effect
goto deathwater_drown_loop // go back and see if player is still drowning
}
goto deathwater_loop
thread debugtext ("END THREAD: deathwater = " + local.index)
end
//*************************************************
//*** setup the deathwater(s)
//*** the level scripts should call this thread
//*************************************************
deathwater_setup:
thread debugtext "THREAD: deathwater_setup"
if ($deathwater == NULL)
{
thread debugtext " There is no deathwater in the map!!!"
local.deathwaters = 0
goto deathwater_setup_end
}
else
local.deathwaters = $deathwater.size
thread debugtext (" There are " + local.deathwaters + " deathwaters in this map")
for (local.i = 1 ; local.i <= $deathwater.size ; local.i ++)
{
thread deathwater local.i
}
deathwater_setup_end:
thread debugtext "END THREAD: deathwater_setup"
end
// text only output if debug mode is turned on
debugtext local.text:
if (level.debug == 1)
println local.text
end
They weren't working for me with a normal-shaped brush either, but I guess talk about that belongs on the mapping forum not the scripting forumtltrude wrote:From what I have read, water brushes should not be cut into irregular shapes or the "water volume" effects may not work correctly.