playMaker

Author Topic: get material?  (Read 4073 times)

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
get material?
« on: August 02, 2011, 09:41:14 PM »
Hello. I am trying to make an FSM that highlights an object when moused over, then cycles through materials when left clicked, ive got the highlighting done and the material change, but I need to return to the original material when the mouse moves off the object. I can't seem to find a way of getting the parent objects material to store in a variable.

Any hints?

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: get material?
« Reply #1 on: August 02, 2011, 11:26:13 PM »
I am not 100% sure nor have i tried but could you not just use Get Parent and store that game object into a variable and then use Get Material using that stored game object and then store that in a variable then set the material?

Q

Proton

  • Playmaker Newbie
  • *
  • Posts: 17
    • NPlay
Re: get material?
« Reply #2 on: August 02, 2011, 11:40:04 PM »
Sounds like a good solution Q, the one problem is 1.1 doesn't have the Material variable type, and no Get Material action :P

But it looks like 1.2 has it:
https://hutonggames.fogbugz.com/default.asp?W311


qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: get material?
« Reply #3 on: August 02, 2011, 11:59:33 PM »
Ahhhh sorry... beta fopas

something to look forward to then... ;D

Q

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: get material?
« Reply #4 on: August 03, 2011, 12:28:07 AM »
Thanks fellas, I assumed that Playmaker had every function that Unity can do mapped to it's actions! Anyway, 1.2 looks like it can do it - turnkey and for now I guess I can figure out how to combine Playmaker with traditional scripting to get material. I wonder how hard it is to combine and pass variables between script/FSM