rather than affecting the material i would just hide the mesh. of course this leads to the question of do all the selectable actors inherit from the same parent? if not it will be difficult to change the visibility on each one directly. you could however create a script in each actor which handles what it does in the event of selection then you could use a interface to call a event which runs the script on each.
what kind of errors were you getting?
I finally figured out how to draw a rectangle and select/move units in my project, but I have no way to mark which is selected and which isn’t.
I have a selection circle material I made and it’s on the npc; set to hidden by default and what I’m trying to do is quite simple. When they are selected they are added to an array of selected actors, I’d then like to set their circles to visible.
But if I try to reference the material and set it to not hidden in the selection_hud bp it spits out errors and any way i attempt to reference the component or material returns errors.
When you select actor/s they are added to an array of them all and I’m trying to forloop and set hidden to false. Any help appreciated.
Here The selection circle is a material put onto a plane static mesh component on my npc bp.
Edit solved!: Figured it out here is the code for anyone wondering how noticed the internet is light on ways to do some of this stuff. Thanks!
Or just draw material in the hud directly, right off that NPC array by projecting world to screen. Should be significantly lighter on performance since it’s just some quads.
Meanwhile you can feed that dynamic material parameters to distinguish between unit types.
I figured it out, but thank you. You guys are like the mvps of this place I love how this forum is full of really friendly helpful people to guide us noobs.
Gonna keep this up since the internet seems light on some of this more basic stuff.
I ended up getting it. But thanks for being such a great community member! Gonna keep this up to help other noobs as well.