Page 1 of 1

Access a Material Parameter at run time

Posted: Sat Nov 17, 2018 1:43 pm
by R.Tomasi
Hello,
I was wondering if there was a way to link flowgraph and a material parameter.
Basically, what i'm trying to do is raytrace from the playercamera, and when it hit a flagged material, a parameter start to increase.
I was talking with themodman101 and apparently this functionnality seems broken... is there is a way to do that in 5.X ?

Re: Access a Material Parameter at run time

Posted: Fri Dec 14, 2018 5:56 pm
by Cry-Flare
There is a node called Material:EntityMaterialParams or Material:MaterialParams that allows you to change specific settings of a material.
ChangingMaterialParams.PNG
ChangingMaterialParams.PNG (11.2 KiB) Viewed 1925 times
[/center]


If you want to change something else that this node doesn't allow you to change you will most likely need to create a whole new material and swap the material using the Material:SetObjectMaterial or the Material:EntityMaterialChange nodes.