Is there a better way to achieve this?

I’m currently developing a game where the player controls a boat. However, I’ve encountered an issue with some of my logic being placed inside the event tick. This decision was made because I need the boat to maintain its speed when accelerating/decelerating, ensuring that the selected speed is retained.

My question arises from my attempt to implement a system where if something breaks, such as the engine, the boat will come to a halt and cease responding to player inputs. However, friends whom I’ve shown these nodes to have expressed concerns about branching the event tick, as it may lead to issues down the line.

Therefore, I’m seeking suggestions on how to improve this aspect of my game. If anyone has alternative ideas or solutions, I would greatly appreciate your input.

Thank you in advance for your assistance!

Having a branch on tick doesn’t matter at all.

Tick gets a bad name because of the things people who don’t know any better hang on it.

You can have horrendous looking tick code, as long as it’s not loading the system unduly.

1 Like

Generally this is fine and Branch on Tick doesn’t change anything.

If I were you, maybe I would delete that second Branch from the Tick and create function “CalculateShipState” that checks if all parts are fixed and set IsEngineFunctional value. Then I would call this function after those overlap events.
But this is not because it will change anything technically, it’s just my personal preference and could be more flexible/readable when you will have more conditions for ship to be functional.

2 Likes