playMaker

Author Topic: Changing a gradient value.  (Read 1378 times)

Doh

  • Full Member
  • ***
  • Posts: 124
Changing a gradient value.
« on: April 25, 2017, 08:44:51 AM »
Hey, I'm having some issues trying to use get/set property on a script to change a gradient colour value, as can be seen in the images provided they're public, however they don't show up in the property list.

Any help would be hugely appreciated!

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Changing a gradient value.
« Reply #1 on: April 26, 2017, 01:13:52 AM »
I am not sure if this is why, but playmaker (at least in custom code), does not support gradients. It casts from FSMobject to gradient I believe. So maybe this is why it cannot change the gradient with a get/set value. The get/set method while handy, doesnt always work. You may need to write a custom script in this case to manage the color gradient field.

Doh

  • Full Member
  • ***
  • Posts: 124
Re: Changing a gradient value.
« Reply #2 on: April 26, 2017, 08:11:04 AM »
Thanks for the suggestion tcmeric! That makes sense.

My coding is awful but I've managed to comment out the part of the script that controls startColor and endColor to stop it overwriting the material properties, for now I can at least change the material itself.