How can I randomly set the scale and color of my instanced Blueprints?

I have a translucent ghost with a white pulsing face that moves towards and faces the character at all times.
Id like to spawn these randomly and will with a spawn actor node hooked to an event tick and delay in the level BP.
But could someone explain how I could set it up where each ghost that is spawned could be of slightly different size? And possibly could I somehow change the tint of the face to be random? If the color was a parameter in the material?

Thank you!!

The logic for doing this can be part of your Ghost’s blueprint. Putting it into the construction script or based on the Begin Play event will guarantee all of your ghosts look different.

Here is a pic!

Scale is pretty simple, I just get a reference to the static mesh for my Ghost (it was just called StaticMesh1) and set its scale to a random vector which i create from a random float in a range based on two float params in my blueprint.

The material effect requires first creating a dynamic instance of my meshes material. If you do this and don’t choose anything specific for the Source Material input then it will just use the material on the mesh at the given index. Next I make a random color using some random float in ranges.

Lemme know if anything isn’t clear!

Excellent!! Yea I figured out the scale before your comment but I couldn’t figure out the tint. This looks perfect thanks!!! :))

My only question…
I have a specific texture on the ghost…
It’s black with a white face as the second material. The face pulses a brighter white within the emission color of the material…is there a way to effect the material I already have assigned?

A bit confused here so I may misunderstand.

The Create Dynamic Material Instance node uses the same material but creates a new instance of it. The material still does everything it did before unless you are altering the material from outside of the material itself.

Wow…I honestly did not know it could be done that way…thank you so much it works as intended without problems. :slight_smile: I appreciate the learning experience,

Super glad i could help!