3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Make Unlimited Timer (in seconds) by a Script  (Read 1177 times)

« on: November 03, 2011, 04:20:44 AM »
Caution : This Topic might be Repeated , but it's not Quoted , Seeking Just to Share Knowledge.

EventTimer :
Time is a fundamental quantity in Physics , We just Refer to it as Time = Time = scalar quantity , and its unit is Seconds
but we cannot define Second as a Value in the Script we can define only the float !
I Really don't know how to Exactly Convert both of them but I've compared Between the Increasing of EventTimer Value and the float Value Theoretically , I made them Equal in Speed when float is Increased by 0.01699

  • Add a Script and Open it;
  • Add ValuePrint Object (to show the Value of Time)
  • Link your Script to the ValuePrint
  • Make ValuePrint Format String = %.01f
  • Do as Shown ..

Code: [Select]
float Time;                        //time value in floats
float Seconds = 0.0169999;         //auto convert floats to Seconds
float Minutes = 0.0169999/60;      //auto convert floats to Minutes
float Hours   = 0.0169999/60/60;   //auto convert floats to Hours   


void Main()
{
OUT_0 = Time;     //OUT_0 = DisplayedValue in the OUTPUT of the Script
Time += Seconds; //increasing only one Second
}

You Can Auto Convert to Seconds\Minutes\Hours by Just Copying the Variables above Void Main() or Simply Divide 60 On Every Increasing unit, or Multiplying 60 when Decreasing in units

  • Press Ok , and Play your Scene

Now , you have a Timer with no needing to adding the EventTimer Object
Keep in mind that this Timer is a World Timer , it's unlimited

Enjoy
and Please , if you have any Ideas about Dispensing on some Events or Objects and it Can be Excuted through a Script , Please Mention it inside this Topic :
« Reply #1 on: November 03, 2011, 08:08:50 AM »
PERFECT! Briliant! AWESOME! i will use this to my project becoues i have never ever seen a cool time like that :)
::=::Look at this ::=::
Rally game

The most important thing that happens, you usualy miss it , but after sometime you will remember
 
even if you didint noticed. Go forward and never look back
« Reply #2 on: November 03, 2011, 04:59:23 PM »
PERFECT! Briliant! AWESOME! i will use this to my project becoues i have never ever seen a cool time like that

Glad I helped , Enjoy it
« Reply #3 on: November 03, 2011, 05:12:18 PM »
very good work, is awesome and very useful :D
See my web:
« Reply #4 on: November 17, 2011, 03:18:27 PM »
very good work, is awesome and very useful :D

Thanx Man , I Hope you Enjoining it in your Games
« Reply #5 on: November 18, 2011, 09:47:40 AM »
Just why is this timer any different than the EventTimer object?
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #6 on: November 18, 2011, 09:55:46 AM »
its scripted and he knows it ;)
::=::Look at this ::=::
Rally game

The most important thing that happens, you usualy miss it , but after sometime you will remember
 
even if you didint noticed. Go forward and never look back
« Reply #7 on: November 18, 2011, 10:06:53 AM »
its scripted and he knows it ;)

I know it to.
A scripted timer is nothing more than: timer += 0.0166667;
That's a timer.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #8 on: November 18, 2011, 10:09:35 AM »
And i love it ;)
::=::Look at this ::=::
Rally game

The most important thing that happens, you usualy miss it , but after sometime you will remember
 
even if you didint noticed. Go forward and never look back
Pages: [1]