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

"Teleport" in script = crashes DoomBuilder

Recommended Posts

Whenever I add the teleport command (Teleport (tid, tag, nosourcefog)), when I compile it... first it says "Cannot compile the script" and shows nothing wrong with it-- though usually something wrong contains the big X. It just doesnt compile, and when I compile a second time it loads, but everything in the game doesnt work.

In fact, when I leave the teleport command in the script editor, it actually doesnt build my nodes. I've been using this for a while and sure know what I'm doing... and its really weird this isn't working. Ive got miles of other code in my maps working fine, but the teleport command is being a bitch.

On top of it, I hate using "Teleport In Sector" since I need to stick the player at a specific location...

Is my Doom Builder messing up?
I'm using zcommon.acs if that helps.
Thanks.

Share this post


Link to post

You could try this:

script 1 (int line)

{
Teleport (1, 0, 0);
}
The number after the action special is the tag of your chosen mapspot which will be your arrival point. You don't have to worry about the other numbers, unless you want the teleportation fog to materialize only when you arrive at your destination. Then you should just change the last number to 1.

Share this post


Link to post
CarpetolA said:

You could try this:

script 1 (int line)

{
Teleport (1, 0, 0);
}
The number after the action special is the tag of your chosen mapspot which will be your arrival point. You don't have to worry about the other numbers, unless you want the teleportation fog to materialize only when you arrive at your destination. Then you should just change the last number to 1.



I used (void) instead of (int line), should I use int line?

Share this post


Link to post

I thought teleport did not use anything more than the tid. You could try getting rid of the second and third numbers and see if it works.

Share this post


Link to post

It'd probably give an error about not enough arguments if you got rid of the last two zeros. According to the ZDoom wiki Teleport uses 3 arguments: Thing ID, sector tag and nosourcefog.

Also, you use script 1 (void) when the script is very specific and you don't pass any arguements to it. Even so, whether you use (void) or (int line) shouldn't give you an error when compiling the script.

I'm not sure why Teleport wouldn't work. Does the script compile if you get rid of this line? If it doesn't, your acc.exe might be screwed up, or perhaps there's already an acc compiler running in the background. (Doom Builder does this to me sometimes, when compiling scripts it'll start the acc process, but won't terminate it, so it gets stuck in some sort of loop and slows my computer right down.)

Share this post


Link to post

stewboy said...
According to the ZDoom wiki Teleport uses 3 arguments: Thing ID, sector tag and nosourcefog.

Ah, I see. The way I found out what arguments are used is by letting Doom Builder tell me. If you don't put a space between the command and the bracket of the arguments, then it will pop open a little text box saying those things. When I do this there is only the argument for "tid". I guess Doom Builder may not be up to date but that is why I suggested that.

Share this post


Link to post
Black Metal said:

I used (void) instead of (int line), should I use int line?

I use "int line" because it's usually a linedef which is the appropriate holder of a teleport action, so yes.
I used a script to test my arena map (which will be out soon, probably), which went like this:

script 4 (int line)
{
Teleport (1, 0, 0);
SetMusic ("blablabla", 0);
Thing_Hate (2, 0, 0);
}
This means that the line which is modified to execute script number 4 will teleport you to your desired destination using a MapSpot with a tag of 1. The second action will set the music to the track which you have chosen to be played. If it is a custom track, then it has to be in your WAD. If you want an original Doom II track, just type it in the script (like D_RUNNIN). The third action will cause monsters with the tag of 2 to hate the player at the moment you arrive at your destination.

Share this post


Link to post

So, I don't see the point of (int line) if you don't use line anywhere. Wouldn't (void) be simpler?

Share this post


Link to post

Hmmm... I tested that, and it worked. So I don't know why it should not work for Black Metal. So Black Metal, are you sure the script is like this?

#include "zcommon.acs"

script 1 (void)
{
Teleport (1(this number being the tag of the destination mapspot), 0, 0);
}

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
×