TelepotOther and many objects

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
DymitrKharitonov
Posts: 26
Joined: Sat Aug 08, 2020 8:12 pm

TelepotOther and many objects

Post by DymitrKharitonov »

TeleportOther will teleport all objects even if there are many? a similar function Move_Thing "If there are multiple things that have the given tids, only the ones with the highest thing numbers will be used" Does TeleportOther work the same or different? And how is all this different from TeleportSpecial?
User avatar
Misery
Posts: 158
Joined: Sun Nov 04, 2018 4:57 pm

Re: TelepotOther and many objects

Post by Misery »

Thing_Move and TeleportOther work exactly the same as far as I know. They both require the same parameters to function, and they achieve the same result. You need only a tag for each actor that is to be teleported, and a tag for each destination, and whether or not you want teleport fog. Every actor must have their own tag. If there is a difference between the two actions, though, I can't tell.
User avatar
Player701
 
 
Posts: 1710
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: TelepotOther and many objects

Post by Player701 »

According to the source code, the differences between Thing_Move and TeleportOther are the following:
  1. TeleportOther does not work with TID 0 (i.e. the activator).
  2. Thing_Move moves only one thing, while TeleportOther will try to teleport every thing that has the given TID.
  3. If multiple destinations with the same TID exist, Thing_Move will always pick the same one every time it is called, while TeleportOther will choose the destination randomly.
  4. Thing_Move does not actually do any teleporting, it just changes the position of the thing. In particular, this means that PreTeleport and PostTeleport virtual methods will not be called.
  5. Thing_Move checks if the thing fits in the destination location. If it doesn't, the thing is moved back to its original position. As a result, telefragging is not possible with Thing_Move.
DymitrKharitonov
Posts: 26
Joined: Sat Aug 08, 2020 8:12 pm

Re: TelepotOther and many objects

Post by DymitrKharitonov »

Player701 wrote:According to the source code, the differences between Thing_Move and TeleportOther are the following:
  1. TeleportOther does not work with TID 0 (i.e. the activator).
  2. Thing_Move moves only one thing, while TeleportOther will try to teleport every thing that has the given TID.
  3. If multiple destinations with the same TID exist, Thing_Move will always pick the same one every time it is called, while TeleportOther will choose the destination randomly.
  4. Thing_Move does not actually do any teleporting, it just changes the position of the thing. In particular, this means that PreTeleport and PostTeleport virtual methods will not be called.
  5. Thing_Move checks if the thing fits in the destination location. If it doesn't, the thing is moved back to its original position. As a result, telefragging is not possible with Thing_Move.
thanks for the answer
Post Reply

Return to “Scripting”