Water Zones...Possible or not?

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Water Zones...Possible or not?

Post by Morpheus »

Just say I have a breakable brush of a large tank in a square room which is a zone with a waterzoneinfo in the tank so its full of water inside, but if I break the breakableglass brush, would the waterzoneinfo fill the room brush with water or would there be a way of making it look like the room fills with water after the tank smashes?

Say I have the tank in the room and put a zone brush on the floor so its the dimentions of the room brush but just a bit higher than the floor. What I would like to happen, if the tank (breakable glass mover) breaks, water appears only inside the floor zone brush. Could this be possible or would it not work due to having to have a zone brush inside the breakableglass mover to get it to have water in it?
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
User avatar
Crowe
Thug
Posts: 13
Joined: Tue Aug 30, 2011 11:41 pm
Location: My Mom's Basement
Contact:

Re: Water Zones...Possible or not?

Post by Crowe »

Zones are absolute. When the level starts, there is either water on the floor or there is not. It is an appealing notion, but there is a reason that what you are describing has not appeared in DX or any of its mods over the course of ten years.
justanotherfan
Illuminati
Posts: 2285
Joined: Sun Feb 27, 2005 11:28 pm

Re: Water Zones...Possible or not?

Post by justanotherfan »

That would be an awesome effect. Still, I think DX is limited to "Is water" and "Is not water". I don't imagine even water-happy games like Crysis take fluid dynamics seriously. It'd be a great use of new physics GPU abilities, but I don't see it going into Deus Ex.
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Water Zones...Possible or not?

Post by Neveos »

The only way to do this is to make the entire room a mover brush, lol, and upon breaking to glass to trigger the entire room downward into a water zone. This is overly complicated unless your room is nothing fancy.

I actually have a flooding event occuring in one of my maps, but I just had it knock out the player and load a map with the water everywhere.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Water Zones...Possible or not?

Post by Morpheus »

Oh well, I did wonder if you could have one waterzoneinfo (or possibly a custom waterzoneinfo) so that its "off" and you could trigger it on/off. Have one set to ON so the zone is full of water, do what I said, breakableglass mover, break it, set the waterzoneinfo to OFF and trigger the other (the one on the floor area that supposed to have water in it), set it to ON? Not that good at scripting but would that be possible? Have not edited anything in quite some time so not really sure about all this.

But hold on...isn't there one area in the game where you can raise the level of the water...may have been a mod? Can't remember where it is but I do remember crates floating in the water and making the water rise, you can jump on the crate(s), possibly the area near LuGuardia base where the lasers are at the beidge with the water below it, you have to get to the other side of it to a door. Don't have time now to check.
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Water Zones...Possible or not?

Post by Jonas »

Nope, you can't turn waterzones on and off, and you can't move them around. You were probably hallucinating.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Crowe
Thug
Posts: 13
Joined: Tue Aug 30, 2011 11:41 pm
Location: My Mom's Basement
Contact:

Re: Water Zones...Possible or not?

Post by Crowe »

ITT: How to add subliminal messages capable of transferring hallucinations to players; specifically hallucinations of a room filling with water after the player breaks open a tank

Thought:

Is the player intended to swim in the water? You say it just appears on the floor. What if you created a movable brush with 0 collision radius, and coded something* that would cause the player's footsteps to sound wet? Breaking the tank would trigger the movable brush (with a translucent water texture) to move into place over the floor, and the code would simulate the player walking through water.

*It should be noted that I do not know anything about coding.

EDIT:

The location to which you refer is the tunnel beneath LaGuardia. There ARE crates floating throughout that area, but the water level remains consistent.
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Water Zones...Possible or not?

Post by Morpheus »

Thanks Crowe for clearing that up...I realised I was thinking of Clive Barkers Undying, it uses Unreal 1 engine and there is a part in it you have to raise the water level, think its an area with a Phoenix in it, but have not played it in so long, can't remember. I'll have to find the game and go into the editor and see how it does that.
Is the player intended to swim in the water? You say it just appears on the floor. What if you created a movable brush with 0 collision radius, and coded something* that would cause the player's footsteps to sound wet? Breaking the tank would trigger the movable brush (with a translucent water texture) to move into place over the floor, and the code would simulate the player walking through water.
That could work ok, as the water isn't going to be deep enough to walk in.
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Water Zones...Possible or not?

Post by DDL »

Guys guys: waterzones are entirely turn-off-and-on-able.

The only thing is, zone boundaries are absolute (determined at rebuild time). So you have to pre-zone the area that you want to be filled with water later. This should be fine, since basic zoning is not exactly rocket science.

After that, the only thing stopping the game treating a waterzone like a waterzone is "bWaterZone": if it's true, no matter whether it was true at the start of the level or whether it became true recently, whenever an actor now enters that zone, it's treated as if it just entered a waterzone.

Bearing that in mind, the only actual problem with simply manually toggling the status via a custom trigger or missionscript..is actors already within the zone. In other words, a crate sitting in a zone that suddenly becomes a waterzone..doesn't know that it's a waterzone, because zone effects are only applied at zonechange events.

This is however easily circumvented by simply calling a zonechange() event for every actor within the zone (or for expediency, every actor that water might be likely to affect..so decos, pawns and ..well, possibly inventory, but I never bothered).

I've been using the following zone info:

Code: Select all

class WaterZoneToggle expands WaterZone;

var() bool bWater;

function PrebeginPlay()
{
	super.PreBeginPlay();

	if(!bWater)      //we start in the 'off' state
	{
		EntrySound = none;
		ExitSound = none;
		EntryActor = none;
		ExitActor = none;
		ViewFog = vect(0.0,0.0,0.0);
		AmbientSound = none;
		bWaterZone = false;
	}
}

function Trigger(actor other, Pawn EventInstigator)
{
	local actor A;

	super.Trigger(Other, EventInstigator);

	if(bWaterZone)
	{
		EntrySound = none;
		ExitSound = none;
		EntryActor = none;
		ExitActor = none;
		ViewFog = vect(0.0,0.0,0.0);
		AmbientSound = none;
		bWaterZone = false;
		foreach ZoneActors(Class'Actor', A)
		{
			A.ZoneChange(Self);
			ActorEntered(A);
			if(DeusexDecoration(A) != none && DeusexDecoration(A).bFloating)
			{
				A.SetPhysics(PHYS_Falling);
			}
			if(Pawn(A) != none)
			{
				if(Pawn(A).HeadRegion.zone == self)
					Pawn(A).HeadZoneChange(self);
				if(Pawn(A).FootRegion.zone == self)
					Pawn(A).FootZoneChange(self);
			}
		}
	}
	else
	{
		EntrySound = default.EntrySound;
		ExitSound = default.ExitSound;
		EntryActor = default.EntryActor;
		ExitActor = default.ExitActor;
		ViewFog = default.ViewFog;
		AmbientSound = default.AmbientSound;
		bWaterZone = true;
		foreach ZoneActors(Class'Actor', A)
		{
			A.ZoneChange(Self);
			ActorEntered(A);
			if(DeusexDecoration(A) != none && DeusexDecoration(A).Buoyancy > DeusexDecoration(A).mass)
			{
			    A.Velocity.Z += 1; //starts the floating
			}
			if(Pawn(A) != none)
			{
				if(Pawn(A).HeadRegion.zone == self)
					Pawn(A).HeadZoneChange(self);
				if(Pawn(A).FootRegion.zone == self)
					Pawn(A).FootZoneChange(self);
			}
		}
	}
}


defaultproperties
{
     bWater=True
}

Which is literally a zoneinfo within which you can trigger bwaterzone off and on. Also, you should probably have a mover representing the water surface that whooshes in upon triggering. Coz otherwise you have a zone that simply acts as water with no indication as to why.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Water Zones...Possible or not?

Post by Jonas »

Why... was I not informed of this? I disapprove
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Water Zones...Possible or not?

Post by DDL »

I swear we had this conversation aaages ago, and you were annoyed that I'd only discovered this after certain TNM maps were already made.

So..short answer: you were, but it still didn't help.

Sorry.

:(
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Water Zones...Possible or not?

Post by Morpheus »

Thanks DDL. I was wondering why people said you couldn't do this, turning off elements in a zone seems easier than turning off a zone entirely. Have to look at Clive Barker's Udying anyway to see how that did the rising water and some other stuff, see what code I can get from that game and port to DX.
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Water Zones...Possible or not?

Post by Neveos »

DDL rock mode on/
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Post Reply