playMaker

Author Topic: Making a prefab instance flash[SOLVED]  (Read 1071 times)

RobotGoggles

  • Playmaker Newbie
  • *
  • Posts: 35
Making a prefab instance flash[SOLVED]
« 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.
« Last Edit: January 22, 2019, 03:26:35 AM by jeanfabre »
When life hands you insomnia, make video games.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Making a prefab instance flash
« Reply #1 on: January 08, 2019, 09:54:53 AM »
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?
Available for Playmaker work

RobotGoggles

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Making a prefab instance flash
« Reply #2 on: January 09, 2019, 02:28:48 AM »
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
When life hands you insomnia, make video games.