PlaceholderGames / 2016-SoS-Game

0 stars 0 forks source link

timers in cpp editable though blueprints #24

Open jonnyboy0868 opened 7 years ago

jonnyboy0868 commented 7 years ago

i have got a basic timer working in unreal 4 that be edited though blueprints, but this starts to count down when the game begins so i am working on a way to set when the timer starts.

FiannaG commented 7 years ago

Good to hear - one thing we need to remember is that we're displaying the timer on the HUD as 02:15am for example so further transformations will be required

Garry's Mod has lua implementation that I've worked with a lot and the game has a function called string.ToMinutesSeconds(time) which does exactly that. The source can be found here for future reference: https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/extensions/string.lua#L153

jonnyboy0868 commented 7 years ago

gitstuff.zip code for basic timer that can be changed in unreal, but also has comments in the CPP that tells the user how to create a visual countdown

jonnyboy0868 commented 7 years ago

still editing for a custom trigger to set the timer off and for a method of being able to have a output in blueprints editor