Jump to content

(GZDoom) Teleporter does not work with new TID


Kloki38

Recommended Posts

Hello,

 

I am making an arena COOP map in which all players are teleported into another section of the map after they kill all enemies. The problem is, that I have to change the players TID in order to do so, but the teleport with the new TID doesn´t work - nothing happens.The changing script is from the wiki.  The rest of my script works fine. 

 

Script 1 ENTER 
{
	Thing_ChangeTID(0, 1000 + PlayerNumber());
}


script 5 (void) 
{
if (++round1 == 2) 
{
	   delay(100);
	   setFont("HBIGFONT");
	   HudMessage(s:"Round 1 has been completed";HUDMSG_TYPEON | HUDMSG_LOG, 0, CR_red, 1.5, 0.4,2.0,0.1, 0.08);
	    delay(145);
	 Teleport(1000,6,0);
     Teleport(1001,7,0); 
} 
}

 

Edited by Kloki38

Share this post


Link to post

Not 100% sure, but that "{" after "round 1" doesn't look right. Looks like it is being removed from the script by the  "//". Try moving it down to the next line.

Share this post


Link to post

Thanks. But the teleporter still doesn´t work.  The message pops up fine and thats it.

Edited by Kloki38

Share this post


Link to post
3 hours ago, Kloki38 said:

Teleport(1000,6,0);

1000 should be the TID of the teleport destination spot. Looks like you have it as the player tid.

I found this on the zdoom wiki if you simply want to teleport the player to a given sector... never tried it before though.

Spoiler

 

SampleTeleportFunction (int tag [, int tid = 0 [, bool silent = false]])

Here is a function that takes one required parameter (tag) and can optionally take two more (tid and silent). If you simply want to teleport the player to a given sector, you might just use this simple line in your ACS code:

SampleTeleportFunction (32);

 

here's the wiki page: https://zdoom.org/wiki/Function_Prototypes

Edited by Payload4367

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...