Set Scalar Parameter Value not working

I’m trying to implement an event that has this character fade when it is triggered, but the set scalar parameter value is not working for it. I tested everything, and every other node is working as intended, everything except for set scalar parameter value.


Loops run on a single frame. Thus, you are setting the scalar 21 times (0-20) in a single tick.

Use a Time Line.

the loop isnt the problem. i was using a 0.05 delay between each loop. so it takes 1 second. the only issue is the set scalar param. i tried having the event just immediately set the value to 0, with no loop or anything, and the character still stays fully visible. the set scalar parameter does not to anything whatsoever is the issue

i also tried using timeline as well, it did not work

You can’t put a delay in a loop. Loops only run in a single frame. Period. The next tick cannot fire until the loop has finished,

Then the timeline was not setup properly or your dynamic material instance is not set. Also you need to run the scalar on a material instance.

(post deleted by author)

it is in a material instance. also, even if the whole loop runs in a single frame, the finished product of the loop would be the enemy now being completely invisible, which does not happen, as it stays visible. i also stated how i tried just having it manually set it to 0, to debug, and it did nothing. which means the only issue is with the set scalar parameter node.

Setting Parameters at runtime on a Material Instance only works when using a Dynamic Material Instance (DMI).

Look at your First image. Fade is a Target for Scalar Parameter and as a Material for Set Material.

Create a DMI. Use the DMI to Set Scalar.

Other issue I’m seeing is After you set scalar param you set a new material. I’m assuming its applying to the same mesh. Thus overwriting anything the scalar does.

Also when you change the material the DMI is no longer valid.


here is the debug test i set up. i tried it both with set material, and without set material, and both times, it did absolutely nothing. i also tested to make sure the DMI was working, by setting it to a random material, and that worked, so i know for sure that it is correct, and the only thing not working is set scalar parameter value.

And that reads:
In this Frame, create a DMI for Element 0 of this mesh. Set the Fade parameter to 0.0, then change the Element 0 material for the same mesh to the default instance of the DMI (Fade = 1.0)

DMI → Set Scalar… DO NOT SET THE MATERIAL AFTER.

i also did tests with the set scalar after set material as well



i did both of these as well, as i said already

Somethings wrong with your material then. I use DMI’s and Timelines on a regular basis.

I’ll do a tutorial vid.

@ShreddedDev

DMI → MI parameter set via Timeline