Jump to content

Teleport() function in ACS not working?


Recommended Posts

I've been working on this map and randomly a script that I wrote which was working before is now broken? Part of the script is a the line: "Teleport(0, 20, 0);" which is supposed to teleport the player to a Teleport Destination with the tag 20. Originally the tag was 13 but I accidentally changed it when tweaking something else, so I just gave it a new one. After that it stopped working. I tried making another teleport destination with another tag and it won't work with that one either. Neither Teleport() or TeleportOther() are working.

 

The rest of the script seems to be working fine. I added a new test line in the same script, printing out a message on the screen, just to make sure there wasn't something wrong with doom builder, and the message printed in game. I can also teleport the player to the destination using a linedef action, triggered when they walk over a linedef. 

 

I also have a hunch that it maybe has something to do with me opening my wad with Slade? I've been using UDB but I wanted to play around with zscript so I opened the archive using Slade. I didn't actually end up making any changes to the wad but it kind of seems like that's when things went wrong?

Share this post


Link to post
17 hours ago, WrickleFreeBrains said:

 Part of the script is a the line: "Teleport(0, 20, 0);" which is supposed to teleport the player to a Teleport Destination with the tag 20.

 

Not quit so.

The first argument is the destination id tag, the second argument is the sector id tag.

Teleporting works with or without giving a sector id tag but must always have a destination id tag.

 

See examples of this in MAP01 and MAP02, with the corresponding scripts.

 

teleport_destination.7z

Edited by Kappes Buur

Share this post


Link to post
On 5/10/2023 at 1:13 PM, Kappes Buur said:

 

Not quit so.

The first argument is the destination id tag, the second argument is the sector id tag.

Teleporting works with or without giving a sector id tag but must always have a destination id tag.

 

See examples of this in MAP01 and MAP02, with the corresponding scripts.

 

teleport_destination.7z

Did a facepalm when I realized my mistake. Thanks for helping me understand

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...