Author Topic: Count down to time (txt)  (Read 974 times)

Bumble B

  • Jr. Member
  • **
  • Posts: 64
    • Bumble B Gaming
Count down to time (txt)
« on: January 25, 2022, 02:18:05 AM »
Yeah its me again with something simple that i just can't get my head around or even where to start.

I want to make a count down timer  for OBS (txt) display.

Basically i want to just say a time and voice attack makes a count down timer to that time.
--
CMDR Bumble B รถ7
ASUS P6TD Deluxe, Intel i7 960 @ 3.2GHz, 12Gb G.Skill, Windows 7 SP1 (64bit), ASUS Geforce GTX 970 Strix (4Gb), ThrustMaster T-Flight HOTAS X, Cosair Void RGB USB Gaming Headset, TrackIR, EDDI, Voice Attack, ED Engineer

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Count down to time (txt)
« Reply #1 on: January 26, 2022, 01:59:58 PM »
You're going to need to figure out
  • what you want to display (E.G. seconds, minutes, hours)
  • how you're going to pass that value to OBS (you mention "txt", so presumably it can read a text file)
  • how you're going to speak the values (I.E. which command phrases you're going to need)
  • how you're going to calculate the difference between the current time and the target time (including whether the target time falls within the current day or not)
  • how you're going to actually count down to the target time once you know how much time needs to elapse

VoiceAttack implements the DateTime datatype (as "date" variables), which can be converted to ticks for math, however in this case you'll likely want to use the TimeSpan datatype instead of that conversion, which will require an inline function.

I don't know why you surmise that this is "something simple", as working with time rarely is. Good luck.