Where would I put a game clock / time that allows casting from/to?
So I've set up a game time system based on an event tick which counts and stores seconds, minutes, hours, days, seasons and years. I figured that the best place for this would be the GameMode, as I don't want to put it in every level blueprint, and it has to be on the server.
The problem is that I seemingly can't cast from/to the GameMode (as it's on the server), so how would I use this 'game time' information to change things like the rotation speed of the sun, or the speed that foliage grows back, etc?
The idea here is that the system would allow for me to change the speed of everything in-game with one variable (time speed). This isn't ACTUALLY changing the time (slow motion, etc.) but changing the rate at which various events fire.
I've tried it in the GameMode (Can't seem to cast) I've tried it in the GameState (No event tick) I'd like to avoid the Level Blueprint and Pawn/Controller.
Would it go in an actor? I suppose it could all go in the sky along with the sun, but then would it be running only on the client?
Any help here would be much appreciated!
asked Jan 18 '15 at 02:07 AM in Blueprint Scripting
You just need to save a float variable that's your time multiplier. So I'd put it in GameState, even though it may not have a tick itself, everywhere that does have a tick will just have to grab the multiplier and multiply the delta time by it.
answered Jan 18 '15 at 02:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here