Is there a way for this code to be more simple/ shorter?

Hi @Axolotl_Gangster, well done for asking! You definitely can make this simpler, by following these steps:

  1. Move the events out of the repeat block - Events are always running, so don’t need to be in any type of loop.

  2. Put your if statement into a function, and call that function inside every event, at the end


You could optimise further by putting your bases into a list, applying events to bases by looping through that list, like so:

but that gets complicated when you need to give different text to info panels, so perhaps leave that out.

Hope that helps! Let me know if you have any further questions about this. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

1 Like