If Variable, Stop?
I am setting a float variable to some number and I want it to be attached to the Yaw module on the MakeRot node. This value will give the light a rotation to make it day or night, rather than the day or night be set to a cycle.
I want the cycle to run unless unless the float variable is set to a number. Then instead the time of day will be set to day or night. However when I try to implement this to the given blueprint, my day or night flickers as if it is not just being set but is being updated horrifically.
How can I keep the cycle, but if I choose a value to be updated, the Yaw will ignore the SunSpeed * Delta Seconds and will just set to the given rotation value, giving it a paused effect at either day or night?
If I could find a way for the cycle to run until the set value is achieved by the MakeRot, and stop, I would do that also.
I found that it was connecting an EventTick just makes it so when setting Day or Night some part of the construction will occur as many times as tick occurs. There was a way to get both working but not both in the same construction.
I eventually found a construction that worked.
I tried all sorts of combinations but it wasn't until I set both casts of the gameInstance BP that held the boolean and S value for yaw to the same branch, set each cast to something different (EventTick & EventBeginPlay), and added a node to stop the set Nighttime from flickering due to how EventTick was coded into the sequence of nodes (it would affect both if I didn't set it up without the Do Once, which I messed up the boolean for --> start closed is not the same as a branch boolean, lol).
Thank you for your help, definitely got me to learn some new nodes such as switch which is very useful and this all got me to a better sequence of nodes involving just one branch. I never like putting one sequence of nodes to both EventTick and EventBeginPlay, just kinda messy, but thanks!
The node you are looking for is "Set Actor Tick Enabled". This will allow you to determine when the tick is firing. What you can do is have a branch that checks if the value you are checking is == to the set value to stop. If true, run "Set actor tick enabled" and set it to false, this will freeze your tick so it doesn't continue running while you are trying toupdate the day/night cycle differently.
answered Dec 17 '15 at 07:03 PM
Use a select float, and a make literal bool. This will select the float you want to use based off your variable conditions.
answered Dec 17 '15 at 09:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here