Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
mgr_inz_rafal

Undoing the SpawnSpot()

Recommended Posts

Hi!
I am making the sector swimmable thorugh the ACS script by calling:

SpawnSpot("WaterZone", 57);
The question is how can I reverse that? How can I make a sector non-swimmable?

Share this post


Link to post

Give the thing you spawn a TID, and then remove that thing using said TID.

E.g.:

SpawnSpot("WaterZone", 57, 666);
Thing_Remove(666);
Though there may be better ways of making an area swimmable or not. For example you could have a liquid 3D floor that you can move below the sector's floor to "drain the water", and back up to "fill the pool".

Share this post


Link to post

Can't get it to work.

Please see the following map:
http://chabowski.eu/tmp/testwater.wad

What I try to achieve is to have a small underwater tunnel. Upon entering the pool I set it to "swimmable" so it behaves like an underwater sector.

The problem is that after the player surfaces, sector remains swimmable and while standing on the red floor player can "swim/fly" up to the ceiling.

Is there any better approach to such problem? I'm a 3D floor newbie, so... who knows :)

Share this post


Link to post

Yeah, I think waterzones just flag up the sector as being swimmable and disappear, so removing them not having any effect doesn't surprise me. The method with Thing_Remove will work for other stuff such as monsters, though.

Okay, here's what you can do.

1. Remove the scripts. They will not be needed.
2. Edit sector #2 (the water control sector), lower its floor to -192 or lower, to put your tunnel safely inside its height.
3. Edit line #9 or #10 ("free" linedefs from your water control sector), change the line you've chosen to be another 160: Sector_Set3dFloor, with args 2 (tunnel sector tag), 2 (swimmable), 0 (no flag), 128 (opacity), 0 (unused). So it'll be the same as line #8, except for the sector tag arg.

This should now work.

Share this post


Link to post

You don't need the scripts, so you can just delete those.

To make an underwater tunnel there are several ways. You can copy the tunnel sector's control sector so that you have two control sectors referencing a single tag. Now you can adjust the properties of this new to match better what you want to do.

You can give the tunnel part multiple tags using green plus sign next to the tag box.

Share this post


Link to post
illuknisaa said:

You can give the tunnel part multiple tags using green plus sign next to the tag box.

That's a newer feature (it's not in an official version of ZDoom yet) so I didn't mention it.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×