Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Eponasoft

ACS... any way to change a Sector's Type?

Recommended Posts

I'm looking over the ACS manual on zdoom.org and am noticing that there is no documented way to change a Sector's Type... is it simply undocumented, or is there truly no way to modify a Sector's Type via ACS? I want to be able to change a Sector's Type from 69 to 0. If this isn't possible, what is the linedef equivalent? Since I'm using the Hexen format now, things aren't quite as clear as they were in normal DOOM format...

Share this post


Link to post
Eponasoft said:

I want to be able to change a Sector's Type from 69 to 0.

Sector Type 69 = -5% to -10% health
Sector Type 0 = Normal

To change from a damaging sector to a less/no damaging sector, use:

Sector_SetDamage (tag, amount, mod);
tag = tag id of sector to alter
amount = amount of damage to impart (in your case = 0)
mod = means of death (in your case, presumably = 0)

You'll need to apply the special to a linedef (e.g., switch, line that player/enemy walks over), enemy (upon whose death the special will be triggered), or pickup (which, upon being picked up, will trigger the special).

[EDIT: I forgot to mention that you can also apply the special to an "action" thing, such as player entering sector, player's eyes go below water, etc.]

Share this post


Link to post

It had no effect. And yes, I am positive that the script executed, since there are other functions in the script that work.

EDIT: OK now I understand fully what you meant... it's an Action Special that needs to be attached to a linedef or thing... unfortunately, it *still* didn't work... the sector is still damaging. I'll try making it further away... maybe that will help.

EDIT2: Nope... still no effect. :( And yes, I'm sure the linedefs are facing the correct direction. :)

Share this post


Link to post

Maybe you could make the sector start off with Type 0, but use the sector_damage action to make it damaging when the map starts. Then when your other script makes it non-damaging, it won't hurt you because it's type was always Type 0?

Share this post


Link to post

That idea had crossed my mind afterward... this site is just so bleedin' slow lately that I hadn't had a chance to post it...

Share this post


Link to post

ToD is on the right track. Apparently, this type of special only works when first applied via a script (such as an OPEN script) and then removed either via a script or via a linedef (or other) special. [This is not specified anywhere in the wiki, and I only discovered it in an obscure post made back in 2006.]

If you want to assign the sector damage directly in your map editor (as opposed to via a script that runs once the map is started) and change it in-game you can use SectorDamage. I don't understand why it is done in this way, as it makes things unnecessarily complicated.

Let me know if you want an example, and I can PM you a small demo wad that illustrates how I have done things. Alternatively, download the demo from the ZDooM forums.

Share this post


Link to post

Also, what about those plain doom2.exe line actions that change the floor texture [like, 20 - S1 Floor Raise to Next Higher Floor (changes texture)]? They also change the Type. You could use zwadconv to see what those doom2.exe line actions would be in hexen format.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×