teleport things with z variable
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
teleport things with z variable
i want teleport something to a specific tid destination but changing the z coordenade.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: teleport things with z variable
How about:
Should Return True if the actor is successfully telported, False if not.
I haven't tested this, BTW. It may contain errors, but should get the idea across.
Code: Select all
Function Int TeleportToZ (Int DestTID, Int SourceTID, Int DestZOffset, Int UseFog)
{
DestX = GetActorX (DestTID);
DestY = GetActorY (DestTID);
DestZ = GetActorZ (DestTID) + DestZOffset;
Return SetActorPosition (SourceTID, DestX, Dest&, DestZ, UseFog);
}
I haven't tested this, BTW. It may contain errors, but should get the idea across.