View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:11 pm



Reply to topic  [ 3 posts ] 
 Timing 
Author Message
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Timing
Anyone know how to make something go on for x amount of seconds?

Like i want an effect im making to happen for "x" seconds..

Any help?
Thanks :)


Fri May 22, 2009 7:27 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Timing
If you create a timer, it would be simple. Something like-a this:
Code:
if timer:IsPastTime(2000) and not timer.IsPastTime(10000) then
--code--
end

You can probably guess, but putting that in your update will check to see if the time is between 2000 ms and 10000 ms since creation of the timer. You can also call timer:Reset(); (I think) to reset the timer.


Fri May 22, 2009 9:25 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: Timing
alright, thanks :)


Fri May 22, 2009 10:08 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.049s | 15 Queries | GZIP : Off ]