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

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

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

Postby RexS » Sun Jan 13, 2019 9:47 am

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 allExpand view
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
User avatar
RexS
 
Joined: 21 Aug 2013

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

Postby Gez » Sun Jan 13, 2019 10:30 am

Have you tried using SetSectorDamage instead of Sector_SetDamage?

Also, you have a healing sector type, 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 XLAT, something like this:

Code: Select allExpand view
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.
Gez
 
 
 
Joined: 06 Jul 2007

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

Postby RexS » Sun Jan 13, 2019 10:37 am

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
RexS
 
Joined: 21 Aug 2013

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

Postby RexS » Sun Jan 13, 2019 11:03 am

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
RexS
 
Joined: 21 Aug 2013

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

Postby RexS » Sun Jan 13, 2019 9:35 pm

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
RexS
 
Joined: 21 Aug 2013

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

Postby RexS » Mon Jan 14, 2019 2:55 pm

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
User avatar
RexS
 
Joined: 21 Aug 2013

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

Postby Gez » Mon Jan 14, 2019 3:29 pm

Ah, the curse of the forgotten semicolon...
Gez
 
 
 
Joined: 06 Jul 2007


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest