runegoblin Posted January 27, 2014 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; Thing_ChangeTID(0,75); SetFont("BIGFONT"); 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); delay(1); if (t == 0) teleport(75,17,0); Activatorsound("misc/teleport",128); } Thing_ChangeTID(75,PreviousTid); } Anyway... I just started to play around with ACS so its just probably bad construction here. Can anyone help me? 0 Share this post Link to post
RocknRoll420 Posted January 28, 2014 I don't actually know anything about ACS but perhaps you aren't teleporting because you never enter the while loop you have there? 0 Share this post Link to post
jmickle66666666 Posted January 28, 2014 yeah, I can't really see what you are trying to do, but the while loop is never entered because t is equal to 0 before it's reached 0 Share this post Link to post
Darch Posted January 28, 2014 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. 0 Share this post Link to post
runegoblin Posted January 28, 2014 Darch, your system worked just damn fine :D Tnx! 0 Share this post Link to post