x

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"

How to toggle color parameter in blueprint for dynamic material

Hello there,

I have managed to make dynamic material that can change color in Game play, but for each change I have to press different key on the keyboard. Here is my blueprint setting for this to work:

alt text alt text

How, what I want to do is to change parameter values of the color whit pressing only one key on the keybord. How can I do that? Can anybody help?

Thank you!

Product Version: UE 4.18
Tags:
more ▼

asked Oct 31 '17 at 10:52 AM in Blueprint Scripting

avatar image

anetopuceto
16 5 6 13

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

This will work if I want to change two values, in my case I have three. I made it work with this event graph:

alt text

But now I have a new problem, I want to change two different materials on one mesh and made this construction but doesn't change anything in Game play...

alt text

Where is my mistake?

working.jpg (406.4 kB)
change-material.jpg (423.6 kB)
more ▼

answered Oct 31 '17 at 12:27 PM

avatar image

anetopuceto
16 5 6 13

(comments are locked)
10|2000 characters needed characters left

In simple way you can use FlipFlop. It will execute A or B outputs alternately.

But to have more control on this you can use some boolean variable like "ColorChanged", and use it as condition to change color. For example, by default ColorChanged == false. When you press key, with Branch check ColorChanged.

On false -> set color to whatever you want -> set ColorChanged to true.

On True -> set color to default one -> set ColorChanged to false.

more ▼

answered Oct 31 '17 at 11:06 AM

avatar image

redbox
4.2k 79 16 101

(comments are locked)
10|2000 characters needed characters left
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