Jump to content

timer


#meS

Recommended Posts

Posted

hello guys

i'm trying to make a running mode.....

so i made a window with a button

the name of the button is enter game

so when he click enter game it shows him a window

i want to set a timer for that window like after waiting 2 mins game starts and warp him a to a postion after 10 mins of playing

i want it to warp all the players who have the data of "xRUN" to a pos and show them the window

-------------------------------------

i did the window the problem is

the timer how much is 2 mins

and how much is 10 mins?

-----------------------------------

Posted (edited)

Two minutes is 120000 ticks

setTimer(someFunction,120000,1) 

Ten minutes is 600000 ticks

setTimer(someFunction,600000,1) 

if you didnt already know the third attribute is the number of times the timer should be run that being "1" in the above examples, but if it's 0 then it's infinite.

Edited by Guest
Posted

@upper poster: That is more than wrong.. 2k ms = 2 seconds, 10k ms = 10 seconds

2 minutes (120 seconds) = 120000 ms

10 minutes (600 seconds) = 600000 ms

(or simply do this: seconds * 1000)

Posted
  
  
lp = getLocalPlayer() 
  
function runt() 
if getElementData(lp,"RUN") == true then  
guiSetVisible(GUIEditor.window[8],false) 
end 
end 
setTimer(runt,120000,1) 

not working ;(

Posted

okay never mind

can u post a code that warp all the players who have the data of "RUN" when one of them hit a marker?

Posted
okay never mind

can u post a code that warp all the players who have the data of "RUN" when one of them hit a marker?

  
addEventHandler -- "onMarkerHit" 
loop -- for ..... do 
getElementsByType -- player 
getElementData -- "RUN" 
setElementPosition 
  

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...