Issue with "Exploring Blueprints Tutorial" - Material Change on Click

Hi everyone,

Kinda new to Unreal, so nice to meet you all. I’m on a learning path, currently trying to follow the “Exploring Blueprints” tutorial: LINK

Right now I’ve followed the three ‘Material Swapping’ videos nearly 10 times, redoing the whole thing and I can’t get it to work. I’ve barely any coding knowledge so this is a whole new world for me. I’ve come to a point where I kinda figured out where the logic isn’t working and I can see this:

I don’t know what else to share to try to figure this out, so please ask me for any other information you need. I’ll be happy to post it, but I really need to get through this before I give up :pensive:

Thanks in advance for your time.

Best,

Nicolas

In order for someone to solve your problem, you’ll need to share what the problem is. Please explain what the desired behavior is, and what the current behavior is. Thanks.

Hi @NachoMonkey2 ,

Thanks for answering! I was so into the issue I actually forgot to clarify what happened, sorry for that. The overall goal for that part of the tutorial is to make the material of a mesh change, once that mesh is clicked:

So when I run the preview, I can see that when I click the mesh the logic goes as expected and cycles through each of those “Set Material” nodes, but once I open that function, I can see that it stops:

I don’t want to clutter the post with a ton of images, you can see what’s the logic in this video: https://learn.unrealengine.com/course/2436529/module/5373086?moduletoken=UHxxnDLPW8SgaLwUD5ziwOV0auDobANRXDoQaf9SJ1gG3QIzpfVA~2OKJrfKUcBq&LPId=90587

So basically what I’d like to know is where to start looking for the mistake so I can provide the necessary info here. I know it can be anywhere, but I can’t find an easier way to troubleshoot this.

Let me know if you think I’m missing sth!

Thanks.

Nicolas

Thanks for responding.

The only way the execution would stop at the “For Each Loop” node would be that the “Speaker List” array is empty. Could you look and see if there is anything in the Speaker list?

Here’s all I have on that Speaker list. If I understand correctly, here is where the tutorial ‘fills’ the Speaker List array with data:


I can see that the logic is setting up that variable, but you can see at the right of the image that the variable says 0 array elements. Then it goes here:

Also, 0 array elements. Somewhere along the logic that should be filled with 5 variants for that mesh, and I don’t see that happening.

So, it seems that that’s the problem, but I have no idea how to fix it.

Nicolas

It looks like you forgot to route the exec wire between the “Set Speaker List” node and the “Initialize Speaker Logic” node.

ForgottenWire

1 Like

Hi @NachoMonkey2,

I’m an idiot. Thank you so much !!! I went through all this like a hundred times and couldn’t spot that stupid thing. Anyways, a rookie mistake I guess. Once again, thanks for taking a look! Everything works now.

Nicolas

You’re not. Everybody makes mistakes :smiley:

1 Like