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

Random Teleporting

Recommended Posts

Found something weird today... at least it seemed weird. I made a teleport pad with no tag on the teleport linedefs. So logically it shouldn't work. But one time after playtesting another part of the level, I went into that room with the teleporter, just to see how it looked. When I walked onto the teleporter, I teleported anyway - to a nearby area wth four mini-sectors, each with its own teleport destination. Those, too, had no tags - I'm gonna use them for an ambush later. But I went to one of those mini-sectors. I went back and entered the teleport again, and appeared at one of the other places. Every time I went in, I'd come out at one of those four random locations.

I don't quite understand what's happening. Now, I should say that I already have some teleport linedefs and destination things placed in the level, but they all have appropriate tags. So my guess (which is likely way off) is that when you walk over a teleport linedef with no tag, you go to a random teleport destination whose sector has no tag either. Is that right?

Share this post


Link to post

That's really weird. Surely someone must have done this before? Surely?

I also just tried using tags. Made a linedef a teleporter with a sector tag of 1, then gave multiple sectors that tag and put teleport exits in each. Same thing happens. I guess that way you could use multiple tags, and be teleported to multiple random places.

Share this post


Link to post

I assume it's just teleporting you to destinations tagged zero. I figured it would just teleport you to the last placed destination with the proper tid (as occurs with voodoo doll players) but I guess it selects one at random?

Share this post


Link to post

frwl/Flange Peddler: That could be really good, yeah. Now that you mention it, I believe I might have seen this before, although I don't have the wad on this comp to check. In the archives as earth.zip, there's this 10-level job which has been one of my favorites since I first played it... but anyway, in level 1 enemies would teleport to locations all over the level. It was the most effective random teleporter thing I'd ever seen. No Revenant or Hell Knight would be in the same place twice. I think that's what the author used. I'm going to go download that again and see.

Cyb: 0 tags... why didn't I think of that? I guess 0 is a valid tag too, in a way. That also explains why pushing any other kind of switch without a tag will produce some pretty weird effects.

Share this post


Link to post
netnomad312 said:

0 tags... why didn't I think of that? I guess 0 is a valid tag too, in a way.

You need to be careful when trying to randomly teleport monsters or players to untagged locations. They could end up stuck in narrow spaces, or worse, in parts of your map that won't allow them to get back to the playable area of the map (e.g., dummy sectors used to hold enemies until they teleport into the playable part of the map).

Share this post


Link to post

well seeing that you only teleport to teleport landings in sectors marked with a linedef tag of 0, it shouldn't be to hard to avoid that bug...
maybe I should make a real map on this...

Share this post


Link to post
ReX said:

You need to be careful when trying to randomly teleport monsters or players to untagged locations. They could end up stuck in narrow spaces, or worse, in parts of your map that won't allow them to get back to the playable area of the map (e.g., dummy sectors used to hold enemies until they teleport into the playable part of the map).


Uh... but that would be where they teleport from. There's no destination thing in there.

Oh, I checked out Earth.wad and was diappointed; it's only a lot of tiny linedefs in a row to about 20 or so locations in that level. Crap. Well, I never liked the monster count in that game anyway. I like that game because it's got really cool scenery (ex.: replacing FIREMAG and FIREBLU sequences with crashing waves, and making the sequence go up to FIREMAGL; various cave entrances and broken walls; the "emerald tower;" a glass elevator; etc.). I swear, it doesn't feel like it's really Doom. But anyway... a level on this would be cool. I'd do it myself but I'm busy with my megawad...

Share this post


Link to post

yeah in zdoom at least (and an option in MBF you can enable, and actually it may have even worked with doom2.exe) tags of 0 count as regular tags. Which is why if, say you want to make an entire map have low gravity (there may be a way to do it through mapinfo, mind you, but I always did it this way) you can do something like:

for(int tag = 0; tag <= 100; tag++)
      Sector_SetGravity(tag, 0, 50);
(mind you that may not be the correct syntax for sector_setgravity, I can't be arsed to look it up atm) which will set all sectors (up to tags of 100 anyway) to half gravity including sectors that are otherwise not tagged.

an ideal system would be to make 'untagged' sectors have tag -1 and have 0 count as a regular tag rather than the pseudo-non-tag it is now, but that's not done for whatever reason, and it's just stuck. As a contrasting example, you can have a sector numbered 0 since linedefs that reference no sector (the back side of a 1s line) reference sector -1 which can never exist. Why tags were never coded in a similar way I dunno.

Share this post


Link to post
Cyb said:

yeah in zdoom at least (and an option in MBF you can enable, and actually it may have even worked with doom2.exe) tags of 0 count as regular tags. Which is why if, say you want to make an entire map have low gravity (there may be a way to do it through mapinfo, mind you, but I always did it this way) you can do something like:

for(int tag = 0; tag <= 100; tag++)
      Sector_SetGravity(tag, 0, 50);
(mind you that may not be the correct syntax for sector_setgravity, I can't be arsed to look it up atm) which will set all sectors (up to tags of 100 anyway) to half gravity including sectors that are otherwise not tagged.

an ideal system would be to make 'untagged' sectors have tag -1 and have 0 count as a regular tag rather than the pseudo-non-tag it is now, but that's not done for whatever reason, and it's just stuck. As a contrasting example, you can have a sector numbered 0 since linedefs that reference no sector (the back side of a 1s line) reference sector -1 which can never exist. Why tags were never coded in a similar way I dunno.


Er... I've never made a ZDoom wad. At least not yet. But that code... see, I do Java in class this year, and the first line of code looks exactly like the Java version. Is ZDoom code based on Java? If so then "sector.setgravity" would make a little more sense. Of course, I'm probably just jumping to conclusions here. *Sheepish grin*

Share this post


Link to post
netnomad312 said:

If so then "sector.setgravity" would make a little more sense.

Actually, Sector_SetGravity (or sector_setgravity, as caps don't make a difference) is the way it would be written in the script, not sector.setgravity.

Share this post


Link to post
ReX said:

Actually, Sector_SetGravity (or sector_setgravity, as caps don't make a difference) is the way it would be written in the script, not sector.setgravity.


Like I said, I was jumping to conclusions...

Share this post


Link to post

Is this strictly for Zdoom?

Because this trick does not seem to work with Doom95 or Doom2.exe.
I've tried both exactly as you've all stated, but I'm not getting and results, unless I'm doing something wrong.

Share this post


Link to post
EarthQuake said:

Is this strictly for Zdoom?

Because this trick does not seem to work with Doom95 or Doom2.exe.
I've tried both exactly as you've all stated, but I'm not getting and results, unless I'm doing something wrong.


You may be right there. Seems like ZDooM is being naughty. I certainly couldn't get it to work just now in DooM95.

Although this does explain why this little trick wasn't found years ago...

Share this post


Link to post
The Flange Peddler said:

You may be right there. Seems like ZDooM is being naughty. I certainly couldn't get it to work just now in DooM95.

Although this does explain why this little trick wasn't found years ago...


Aww, well. People do make ZDoom wads. Just include this in one...

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
×