Is it possible to make a healing sector in DiD with ACS?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)
Post Reply
User avatar
SouthernLion
Posts: 776
Joined: Wed Aug 21, 2013 6:45 pm

Is it possible to make a healing sector in DiD with ACS?

Post by SouthernLion »

I have a sort of jerry-rigged set up for DiD where my map is running some basic ACS, and I was trying to make a sector heal:

Code: Select all

Sector_SetDamage (2011, -7, 0);
and it just does nothing, where as if it is a positive value it hurts (obviously.) Is there no other way to do this?

This is the loop-hole I was using for DiD (if you see the edit history, I started that page when I found out it actually works, lol.)

https://zdoom.org/wiki/Using_ACS_in_Doom-format_maps
Gez
 
 
Posts: 17834
Joined: Fri Jul 06, 2007 3:22 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by Gez »

Have you tried using [wiki]SetSectorDamage[/wiki] instead of [wiki]Sector_SetDamage[/wiki]?

Also, you have a healing [wiki]sector type[/wiki], Sector_Heal. It's type 196 in Hexen format, you can try to see if it works directly in in Doom format too. If it doesn't, then add it through [wiki]XLAT[/wiki], something like this:

Code: Select all

include "xlat/doom.txt"
sector 25 = Sector_Heal
And then use ZMAPINFO to assign your custom translator to your map, and use sector type 25 for healing sectors.
User avatar
SouthernLion
Posts: 776
Joined: Wed Aug 21, 2013 6:45 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by SouthernLion »

Thanks, I'll try the XLAT way. When I do SetSectorDamage it isn't even recognized in the script editor. I feel like I'm doing something wrong. lol


User avatar
SouthernLion
Posts: 776
Joined: Wed Aug 21, 2013 6:45 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by SouthernLion »

Huh. I can't get it to work with XLAT, either. Maybe it's because I use Zandronum and not Z-Doom? (I thought Zandronum was Z-Doom based?) I made a .txt file with the code above you gave me, put it in the .wad as "HEAL", and then put translator = "HEAL" inside the map brackets in my MAPINFO (I tried with ZMAPINFO also). SLADE recognizes it as a Map Translator, so again, either I'm putting the information for the map in wrong... or... I'm SOL cause I use Zandronum. Hm..

EDIT: Nope, just tested it on GZDoom, same problem. I set it as sector type 2011 for healing and it causes damage instead. lol
User avatar
SouthernLion
Posts: 776
Joined: Wed Aug 21, 2013 6:45 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by SouthernLion »

Sigh. I don't know what I'm doing wrong. :( I've spent the last like 5 hours trying to make this work lmao

Maybe I'm doing XLAT wrong? This is exactly what I did.

I made a .txt file named HEAL.txt with these two lines in it

include "xlat/doom.txt"
sector 2011 = Sector_Heal

and put it inside my file. Slade recognizes it as a "translation" Zdoom file.

Inside of my ZMAPINFO I have the line

translator = "HEAL"

I have tried it inside both the gameinfo, the map brackets, and both at the same time.

I have the sector special 2011 inside Doom Builder 2.

Nothing happens, no matter what combination I do of this.....
User avatar
SouthernLion
Posts: 776
Joined: Wed Aug 21, 2013 6:45 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by SouthernLion »

UPDATE: Apparently, you can't use Sector Type 2011, so I went with 25 like you had suggested, and you have to put a semicolon at the end.

Well. It works now. THANK YOU! lol
Gez
 
 
Posts: 17834
Joined: Fri Jul 06, 2007 3:22 pm

Re: Is it possible to make a healing sector in DiD with ACS?

Post by Gez »

Ah, the curse of the forgotten semicolon...
Post Reply

Return to “Scripting”