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
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
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 :
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 :