Nah, gameplay is overrated Glad you got things working.
I guess I forgot to add the option of delaying the stealth functionality. Spawning the grid manager and placing units after the game has started is not something I’ve tested extensively yet, so it is not surprising that it is not working properly for less central features such as the stealth system. Should be easy enough to fix, though. I’m away from home until Sunday, so I cannot test it out myself, but here are some ideas:
It could be done lazily by having the begin play events of the stealth components check every tick if the turn manager is accessible from the game state (is valid) and finish setup once this returns true. That is pretty bad design, though, and having every unit with a stealth components running tick events simultaneously is not very performant. Should not matter much for most games, but I would want to do something better for an official implementation.
My first thought is to disable EventBeginPlay for the stealth components of both the grid manager and units. Then in the turn manager, after the initiative order array has been set up I would get a reference to the grid manager from the game state and check if it has the stealth component. If it does I would then run the event normally handled by EventBeginPlay before looping through all units in the initiative array and similarly running new custom events in place of their EventBeginPlay events for all units that have the stealth component. I might be getting the ordering wrong for which of the GridManager stealth component and unit stealth components that should be activated first, but other than that I think it should work.
Irrespective of whether such a change fixes any issues it is good practice to explicitly specify the order in which interdependent blueprints are activated, so I will be doing something like this in a future update. Thanks for making me aware of the problem.
Hey! Again I’m afraid I’ll have to ask you to be a bit more specific. With click-on-tile action do you mean that this is tied to the click event of a BP_Ability child actor? Also what do you mean when you say you want to move to a tile without actual movement? Do you mean moving the reference to the unit from one index in the GridActors map to another? If so, that can be done using the SimulateMove event. You can see an example of how to implement that in the event graph of BP_Unit. If you were to run simulate move without queuing the move action the unit reference would be moved in the array, but the actor itself would keep its location.