Hello!
I'm new to the forum and new to Doom level editing. I'm using Ultimate Doom Builder with GZDoom, along with SLADE.
I've made a map with swimmable water using transparent 3D floors. I'm trying to find a way to add a “splash” effect when the player and/or monsters enter or exit the 3d water. I originally tried doing this with ACS; I’ve managed to write a script that detects when the player is in or out of the water, and I can imagine fleshing out the script to have it spawn some water‑colored particles at the player’s feet that spread outward to simulate a splash when it switches from 'out of water' to 'in water'....
What I can’t figure out is how to detect when a MONSTER moves into or out of the water. I’m starting to think ZScript might be the way forward. I watched a YouTube video by DavidXNewton (https://www.youtube.com/watch?v=jGLdk6Xe92A) where killing a monster triggers an orb (a ZScript actor) to spawn in a pattern similar to what I want for my splash effect (I would replace the orb with a blue water blob that I can make in zscript... I think). The issue is that while that event handler uses WorldThingDied(), I don’t know of any equivalent function for detecting when an actor enters or leaves a 3D water volume.
Does anyone have ideas on how to approach this? I’ve been wrestling with it all week. I even resorted to trying ChatGPT at one point... which was infuriating, because ChatGPT tends to get very overconfident about how “foolproof” its code is (and it never worked here, despite ChatGPT's confidence).
Anyway, any help would be greatly appreciated. Thanks so much for your time!
By the way, if you're interested, here’s my ACS script that detects whether the player is in water (3), out of water (0), or at varying depths (1 or 2). It doesn’t spawn anything yet... it was just a proof of concept to confirm I could track the player’s depth.
script 18 ENTER
{
while (TRUE)
{
int wl = GetActorProperty(0, APROP_Waterlevel);
HudMessage(
s:"Water Level: ", d:wl;
HUDMSG_PLAIN,
1, // unique ID
CR_WHITE, // color
0.5, 0.05, // position (top center-ish)
0.1 // display time (short because it's constantly refreshing)
);
Delay(1); // runs every tic (~35 times per second)
}
}
[ZScript] Detecting actors entering swimmable 3D water (for splash effects)
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
cjdubreu
- Posts: 5
- Joined: Tue Mar 31, 2026 5:44 am
- Operating System Version (Optional): windows
-
Enjay
-

- Posts: 27684
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [ZScript] Detecting actors entering swimmable 3D water (for splash effects)
There is a built in terrain and splash actors system. It can create splashes on entering 3D water.
https://zdoom.org/w/index.php?title=TERRAIN
https://zdoom.org/w/index.php?title=TERRAIN
-
cjdubreu
- Posts: 5
- Joined: Tue Mar 31, 2026 5:44 am
- Operating System Version (Optional): windows
Re: [ZScript] Detecting actors entering swimmable 3D water (for splash effects)
Wow! Thanks so much for the fast reply! Really appreciate it Enjay! 