Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UMG Events Depending on Button Sequence

Hello all,

I've been playing around with the UMG functions and I would like to implement a certain function I've been trying to solve but to no avail.

In my UMG, I have two buttons which I intent to select different classes of meshes in my world.

alt text

Then, I have separate buttons to adjust the materials/colors of each mesh.

alt text

And this is how I'm changing the materials of the StaticMeshActors in my level.

alt text

With these blueprints, I would like to change the material of the selected mesh from the button but after selecting the cylinder and changing its color to blue, it will change both meshes' colors to blue and the subsequent colors will end up being the same.

I've tried using boolean functions to check if one has been clicked to deselect the other one but it seems like a very inefficient way to do these simple things.

If anyone could point me to the correct direction (preferably with Event Dispatchers since I'm trying to learn it), that would be really great.


Product Version: UE 4.21
buttons.png (154.3 kB)
color-changing.png (182.0 kB)
more ▼

asked Mar 27 '19 at 03:31 PM in Blueprint Scripting

avatar image

6 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


After taking a coffee break, I've managed to do it in a very unconventional (and inefficient) way.alt text

I'm still curious on how this can be done in a more efficient way so if anyone could share how this would be implemented, that would be real nice!

workinglogic.png (354.4 kB)
more ▼

answered Mar 27 '19 at 04:21 PM

avatar image

6 3 3

avatar image Drgy55 Mar 28 '19 at 02:12 AM

One more extendable method you might try is to generalize your array more. For example, you have cubes and cylinders, right? Maybe make a parent class called "Shapes" and let cubes and cylinders inherit from that. Then you can store all the cubes or all the cylinders in a "Shapes" array and simply change the color of all those stored shapes (which will be either cubes or cylinders, but not both) on key press.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question