Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: RobotGoggles on January 07, 2019, 02:13:30 AM
-
Been spinning my wheels about this a lot and it seems like it should be simple to do, but I can't figure it out for the life of me:
I'm just trying to make the characters in my game flash when they take damage.
Issue #1 is that each character consists of several objects in a hierarchy, so if I change the material on the object level I would need an action for each object that makes up the character, and I can't even use the "get child" function easily since some of the objects are nested within the hierarchy.
Issue #2 is that the characters are instanced and are very often on screen with other clones, so If I flash the material, everything with the material will flash.
Any suggestions would be swell.
-
That's fucked up.
Is there a way to make a "hit event sender" for each object that makes up the character that will send "hit" event to a "flash manager" who will send the "flash event" to all children that need to flash?
-
That totally worked! I just put a simple fsm on each objects and then sent the event to all children. A lot cleaner than I was expecting