x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!

Product Version: Not Selected
Tags:
more ▼

asked Jan 18 '15 at 02:07 AM in Blueprint Scripting

avatar image

Tylru
79 24 27 31

avatar image eXi Jan 18 '15 at 02:30 AM

Why can't you cast to the GameMode? Is the Cast To Node not appearing? Have you tried turning "Context senstive" on / off?

If this is a multiplayer thing and you want the server to handle everything, then i would just replicate the result. So if you want to move the Sun, let the server calculate the "time speed" and also let him move the sun. Then only replicate the suns position.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jan 18 '15 at 02:27 AM

avatar image

Furroy
696 26 86 61

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question