I’m trying to create a classic turn based RPG with up to 4 playable characters at a time. The initial setup is fine, there are multiple ways to set it up and tutorials. I’m having a very specific problem on setting up status on character pawns (e.g. Stun, Burning, Paralyzed, etc.) when they come from multiple sources. ‘Status’ are basically booleans in the Character blueprint with appropriate logic when they are switch to True/False.
Example 1 (this is fine): Character enters a fire area => Fire area is a actor with collision using a interface to activate “IsBurning” boolean on character pawn.
Character exits fire area => Fire area actor uses interface to turn off “IsBurning” boolean on character. No problems here.
Example 2 (this is my question): Character enter fire area 1 => “IsBurning” = true
A second fire area has some overlap with the first. Character enters fire area 2 => “IsBurning” is turned to “true” again. This is fine, character keeps on burning.
Character steps out of fire area 1 while still inside fire area 2 => The first fire area actor will switch “IsBurning” to false which is incorrect, because it is still inside other fire area. The 2 fire area actors don’t ‘know’ about each other.
How can I set this up when the location and number of actors that will cause the same effect on the target is only known at run time (might be 2, 3, 4…)? How would you deal with the same problem with overlapping timers? Should I build a “Status Manager” to check for all status actors at all turns? Seem messy. Does anybody has any tips or marketplace items that deal with this specific problem?