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

Sector tagging in groups

Recommended Posts

So here's another of my conundrums. Before I create a lot of work for myself by changing things too much, I'd like to know--can a group of sectors have a tag other than what the sectors have individually? What I mean is that I have a huge group of sectors that are tagged individually, and I'd like to add a new tag to all of them as a group; they would each have two tags total, but one of them would apply to all of them and one would be sector-specific. I don't know, I hope I stated that clearly. Please advise!

Share this post


Link to post

Sectors have only one tag. They do not have an individual tag and a group tag, they have a sector tag, full stop.

What you can do if you want to group sectors together that still have individual tags is to put them into a range. E.g. tag them from 101 to 110, instead of tagging them something like 2, 3, 7, 13, 26, 51, 52, 59, 60, 61. Then when you want your script to affect one of them, you do:

Sector_DoSomething(105);
And when you want to affect all of them, you do:
For (int i = 101; i <= 110; ++i)
{
      Sector_DoSomething(i);
}
You can use #define to create your groups if you want to make your script more legible (also easier to update).
#define GROUP_1_START 101
#define GROUP_1_STOP 110

For (int i = GROUP_1_START; i <= GROUP_1_STOP; ++i)
{
      Sector_DoSomethign(i);
}

Share this post


Link to post

Depending on exactly which actions you want to apply to the sectors, it may be possible to do it without scripts using entrainers (stairbuilders and donuts), since they act on groups of sectors independently of tags, though that's a pretty hairy technique.

Share this post


Link to post

It'd be better if you said what you're trying to do/ why you want extra tags. My guess is you want to easily select a group of sectors in doombuilder. If so maybe just give that whole group a weird floor texture or anything unique and searchable, then search for that floor texture to find that group.

Share this post


Link to post

With UDMF you can give arbitrary properties to map elements (they must, however, begin with the "user_" prefix) so you could give sectors the "user_group" property with the value you want. Then you retrieve that data with UDMF info functions.

Share this post


Link to post

Doomsday's XG can also easily make line or sector triggers that perform actions on several sectors and/or lines that have different tags.

Share this post


Link to post
gggmork said:

It'd be better if you said what you're trying to do/ why you want extra tags. My guess is you want to easily select a group of sectors in doombuilder. If so maybe just give that whole group a weird floor texture or anything unique and searchable, then search for that floor texture to find that group.


I've got a room full of open-top boxes with switch-activated crushers above them. There's a ramp and a series of 3D bridges so you can run along the rims and cross the room to a platform, but I want to prevent the player from falling into any of them, because there's no way out.

Technically this is only as difficult as making some linedefs block players, but I want something visible to keep the player out. I figured I'd set up a dummy sector and do a transfer heights to make a fake floor out of a translucent force-fieild texture. Unfortunately, the sectors are already tagged to their individual crusher switches.

In retrospect, i guess one solution would be to make one dummy sector for each crusher. Tedious, but doable.

Share this post


Link to post

Actually, I take that back. It's not doable. I thought I could make a 3D floor that you could walk on but Cacodemons could still rise through. It looks as though I was mistaken--so I'm just settling for force-field sidedefs that block the player. It works okay.

Share this post


Link to post

Kind of hard to understand exactly. There's probably a solution, especially if you're using 'doom in hexen' format so you can use acs, but it'd be easier for me to fiddle with the actual map directly so I can know what is going on better, which I can try to do in PMs or something if you want and can't figure it out.

Share this post


Link to post

I'm doing UDMF. I'm a little reluctant to share the map before it's finished, even though obviously that would be a really private way to do it. Put simply, I want to make a 3D floor that's passable one-way. Forget the original problem, that one's solved.

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
×