playMaker

Author Topic: Object vs game object  (Read 1467 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Object vs game object
« on: December 26, 2014, 07:44:49 PM »
So I want to turn change the colors (set material color action) of a tank.  The tank have several childs and not all have renderers.  So I am trying to use 'get next child' action.  if all of the childs have a renderer, it works.  however, some do not. 

So my problem (OK, one of my problems) is that I can't change all of the childs with renderers.  I use the 'get next child' and set it to a variable.  The variable is a game object.  However, the get property or set property requires a 'object', not a 'game object'

So how do I use the variable (which is set in the 'get next child') to see if it has a renderer.  If not, then I need to pass on it and go back.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Object vs game object
« Reply #1 on: December 30, 2014, 12:19:04 PM »
Did you try using the "has component" action to check for the renderer?
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Object vs game object
« Reply #2 on: December 30, 2014, 01:47:27 PM »
No, but that seems like something I could try.