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"

Blueprint scripting for changing color works for static meshes except one

Hi guys,

I wanted to make my scene interactive while in game play so I started making some blueprints. I'm very new at this so I followed tutorials for guidelines. I successfully made some of my static mashes (furniture) to change color with the same pattern except one. One of the walls in the room I want to change color, but the same blueprint scripting that I used on the other meshes doesn't seem to work in this case. I don't know what's the problem.

Here are some screenshots of the settings in the blueprint for the furniture...

alt text alt text

and for the wall...

alt text alt text alt text

I could use some help! Tnx

[2]: /storage/temp/217290-not-working-2.png

Product Version: UE 4.15
Tags:
working-1.png (658.1 kB)
working-3.png (473.5 kB)
not-working-1.png (617.0 kB)
not-working-2.png (370.7 kB)
not-working-3.png (430.8 kB)
more ▼

asked Oct 19 '17 at 09:47 PM in Blueprint Scripting

avatar image

anetopuceto
16 5 8 14

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

1 answer: sort voted first

There's no source material selected in not-working-2.png.

more ▼

answered Oct 19 '17 at 10:09 PM

avatar image

Everynone
12.5k 71 24 51

avatar image anetopuceto Oct 21 '17 at 10:03 AM

I added the source material but nothing changed!

avatar image Everynone Oct 21 '17 at 11:08 AM

Could you please show a screenshot of the wall material setup? Also, put a PrintText node after F and see if it prints at all; perhaps the key input is not being sent.

The rest looks good at a glance.

avatar image anetopuceto Oct 21 '17 at 11:35 AM

Ok, so I thought something is wrong with the mesh, so I made a new blueprint for another wall, after I made the blueprint I build the lightning and restart the scene. When I opened the scene and put it in to game mode the first wall that didn't work it stared to change color but now the new wall has the same problem. Any thoughts? Btw here a screenshot of the wall material... alt text

avatar image Everynone Oct 23 '17 at 07:20 AM

My guess would be that the F key consumes input (select the F node and check details panel) and once it does, nothing else has the chance to react to the F key anymore.

If you are planning on having multiple objects react to the same action, you should place the triggering logic elsewhere; ideally some place where it can be executed globally.

For example, create a CustomEvent/Function for the objects that need to react to colour changes. Use the F key in your LevelBlueprint, get the objects you want to interact with and call their ColourChange event/function.

avatar image anetopuceto Oct 29 '17 at 01:25 PM

So sorry for the late response, I've checked the key input and seems ok... or maybe not... btw now it's working, I updated the new 4.18 version and only changed the size of the box collision because it was interacting with the other box collision from different blueprint mesh. Could that be the problem?

alt text

key-input.jpg (257.1 kB)
avatar image Everynone Oct 29 '17 at 02:14 PM

[...]btw now it's working

If you managed to get it to work the way you need, please consider marking the issue as resolved.

(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