Timer:SetRealTimeLimitS

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
m (updating function page)
m (updating function page)
 
Line 5: Line 5:
|description =
|description =
Sets the real time limit value of this Timer, RELATVE to the start time. This is when the timer is supposed to show that it has 'expired' or reached whatever time limit it is supposed to keep track of.
Sets the real time limit value of this Timer, RELATVE to the start time. This is when the timer is supposed to show that it has 'expired' or reached whatever time limit it is supposed to keep track of.
-
|codedesc = This will gib the object this script is attached to after 5 seconds have passed.
+
  }}
-
|code = <code lua n>
+
-
function create(self)
+
-
    self.LTimer = Timer(); --this is needed for "Timer:IsPastSimMS" to work.
+
-
end
+
-
 
+
-
function update(self)
+
-
    if Timer:IsPastSimMs(5000) == true then --checks if 5 seconds (5000 milliseconds) have passed
+
-
        self:GibThis(); --if 5 seconds have passed, gib(kill) the object!
+
-
    end
+
-
end</code>
+
-
|output = nil
+
-
}}
+

Latest revision as of 00:56, 28 June 2012

Function
SyntaxSetRealTimeLimitS( * A positive double with the new real time limit relative to the start time. )
Description:
Sets the real time limit value of this Timer, RELATVE to the start time. This is when the timer is supposed to show that it has 'expired' or reached whatever time limit it is supposed to keep track of.
ReturnsNone.




Example
DescriptionPlaceholder!
Code
  1. for k,v in pairs(PagesWithoutExamples) do
  2.     v.MakeExample(NoErrors);
  3. end
OutputPlaceholder!
Personal tools