Another is hex tile generator Blueprint for generating hexagon BP. The tiling script is a function in hextile_BP
Also HexTile_BP is added in world outliner
Once event begin play called it creates hexagon tiles.
Now How do I create dynamic material instance on all those hexagon mesh generated by hexTile_BP and how to change access/edit those instances in blueprints.
I can do most of it but, I am struggling with generating material instaces for each hexagon and then communicating their properties between both BP
Below images shows HexTileGenrator_BP
And HexMesh_BP has only hexagon mesh.
I was following this tutorial
It is not that hard for single mesh. But I don’t know how to do it for multiples meshes.
I did it by adding function “set material to Mesh” then feed the Dynamic material to it. But in tutorial video he didn’t do that then how his script working? He never applied Dynamic Material to chair cushion. He simply created dynamic instance of chair material and changed its color using variable dynamic material. He didn’t apply dynamic material to chair cushion. But I had to. Why?
I set my dynamic material random color. Now How can I setup event dispatcher for communicating each HexMesh’s instance’s color with each other in HexTiling_BP Any basic quick example or tutorial link?
I want to be able get values of those color on click or tap and perform some math on them later on with respect to each other.
Thank you
Ensure the Parameter Names match what’s in the material. Every time the Hex actor is clicked, this event will be executed. When you drag a wire from the Return Value pin, search for ‘assign’ and then dispatcher name - this will automagically create the event with the correct signature.
This way you can bind the dispatcher call to another event elsewhere (outside the function) or even another function - super useful and it make it neater, with fewer wires snaking around.
Important: you must ensure the signature on the event / function:
I am not properly getting answer. Please help.
First in which blueprint I have to create this event.
Also we have events for mesh in details pan. and there is on clicked event with same variables"Touched Component/ Button pressed" Is this a same thing?
Thanks for this. Now I understood how it works. I cut pasted it as you said. First in HexMesh_BP didnt work. It was unable to find that custom event.
Then I redo the same again. But this time I pasted that custom event in HexTiling_BP. Got no error.
But it still didnt print the actor name.
Do I have to call that custom event from somewhere ? But I already bind it to On Clicked Dispatcher.
Do I have to assign variable to “Button Pressed”. I was only able attached setter to it and assign left click. Didnt work!