Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Doh on April 25, 2017, 08:44:51 AM

Title: Changing a gradient value.
Post by: Doh 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!
Title: Re: Changing a gradient value.
Post by: tcmeric 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.
Title: Re: Changing a gradient value.
Post by: Doh 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.