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

Teleporting through ACS in GZDoom

Recommended Posts

Well, hello guys... I'm gettin a lil trouble trying to teleport the player to a chosen sector through ACS. Can you guis help me?

My idea is that the player - after activate this script - starts to teleport randomly to the sectors marked with the "17" tag at every 10 seconds.

script 4 (void)
    int PreviousTid = ActivatorTid();
    int t = 0;


    while(t != 0) 
        t = 10 - Timer()/35 ;
        HudMessage(d:t/60, s:":", d:(t%60)/10, d:t%10;
                HUDMSG_PLAIN, 1, CR_RED, 0.5, 0.5, 2.0);
        if (t == 0)
Anyway... I just started to play around with ACS so its just probably bad construction here. Can anyone help me?

Share this post

Link to post

According to ZDoom wiki, teleport destination is already randomized if teleport destination spots have same tid and you don't specify any sector on the script. If the player is the activator already, maybe you can try something simpler like:

Teleport (99, 17, 1) // 99 is the tid of all teleport destination spots
delay (350) // this waits for 10 seconds
Teleport (99, 17, 1) // repeat as many times as you want.

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