playMaker

Author Topic: get material action not getting material for some reason  (Read 1513 times)

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
get material action not getting material for some reason
« on: December 22, 2017, 12:45:19 AM »
hey playmakers out there. I've been fiddling with a health script and i'm having a little trouble putting some effects on my script for when my game object dies.

I'm trying to use the action get material in order to get everything i need to gradually fade out the game object before deleting it. Problem is when I run my script it doesn't look like its picking up the material on the game object. I did see this action has a material index thingy on it but I don't know if that has anything to do with my problem

Best, Jelly

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: get material action not getting material for some reason
« Reply #1 on: December 22, 2017, 05:10:56 AM »
Hi.
i just tried on a simple Cube and it seems to work there.
Can you show an image from the inspector from your gameobject?


Maybe you can use the action 'Set Material Color' to 'feed' to the gameobject.
To manipulate the Alpha you can use 'Set Color RGBA'
and to manipulate the float for the alpha you can use 'Float Interpolate' or use a tween.


jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
Re: get material action not getting material for some reason[SOLVED]
« Reply #2 on: December 22, 2017, 12:47:24 PM »
i tried out a test setup and it worked, i think i may have had my get material action in the wrong place last night because its working properly today, I did have to move my get material action to my start state though. that may have been my problem

Best, Jelly