Transient tags

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

SuaveSteve
Posts: 76
Joined: Sat Jul 05, 2014 7:38 am

Transient tags

Post by SuaveSteve »

Currently, there is no way to reference a single sector/line in ACS without it having a unique tag, you cannot even reference by index.

The idea for transient tags is to open the way for ACS functions with can return references to map geometry on the fly without the map maker having to tag all of them in the map.

Here's an example. Lets say I have a set of floors and I want them to lower and do something else. Normally I could use floor lower special and not even tag the sector if the line is part of it, but now that I need to script, the sectors for each floor must be tagged.

What if I could do this...

Code: Select all

int activator_line_tag = GetActivator();// returns unique tag, if the linedef does not have a unique tag, the engine assigns one

int activator_sector_tag = GetSectorOfLine(activator_tag);  // same as above, but for the sector

Floor_LowerToLowest (sector_tag, 8);


// now brighten the room ahead

int opposite_sector = GetAdjacentSector(sector_tag, activator_tag); // line direction does not matter, and, again, whatever the adjacent is, it will get a unique tag if it does not have one already

Light_Fade(opposite_sector, 255, 35 * 5);
Those three new functions are just ideas/examples, but hopefully you get the idea.

In the end of day, sectors are still tagged, but this allows scripts to "discover" them and hold on to them.

Return to “Feature Suggestions [GZDoom]”