Need to assign a material to a blueprint???

Hello,

I am very new to unreal, and need something to work but can’t figure out how to do it!

I need an event to take place, when the player walks over the material I have made - There would be lots of objects using this material so I am looking for the easiest way to make this work. The practical use of this is a little bit like the ‘dont touch the floor game’ - where my red material is lava, and touching it sends the player back to the beginning.

Would greatly appreciate it if someone can map this out for me!

Thankyou :slight_smile:

Hello Valadrix! Welcome to the Unreal Engine World!

What you are trying to make is that when the player touches the floor it will be “respawned”, right? Correct me if I’m wrong…

To do thisI think it will be better to position Trigger boxes/collision boxes in the places the player should not touch, then set the collision response of those boxes to OverlapOnlyPawn.

Hope it was helpful and what you are searching for! Good Luck! :wink:

This is what I am after yes! Was just wondering if there was a more efficient way of doing it that would take up little amounts of blueprints space! (OCD ikr…), so i would need an event for each box? Rather than just a global event for one material?

how does your level will be structured?
An easier way will be making two different meshes; one will be your floor, where the player can walk(touch) and the other will be the floor the player can’t walk(touch) in your case will be lava. With this done you could apply the materials to each of the meshes, the floor material and the lava material with some amazing effects!

You should make a blueprint using the lava mesh, in the collision you should set it to OverlapOnlyPawn, so you can use the ComponentBeginOverlap Event and make your script…

I think you’re looking for something like this:

Create a new blueprint class and select actor.

Now add two components, one “Cube”, and one “Box Collision”. you can play around with the settings in the details panel to change the size of the cube and apply a different material. Don’t forget to change the scale of the Box Collision aswell!

Select the “Box Collision” in the components panel, then click on the “+” icon next to “OnComponentBeginOverlap”

All you have to do now is to create the respawn logic when it hits True on the Branch, there a bunch of tutorials on youtube and even the forums etcetera on how to do this.

Drag the blueprint from the content browser into the level, best of all: you can drag it into your level as much as you like.
Good luck, hope this is what you’re looking for.

Unitrix.

That is great! Thanks for the help, shall try figure out how to do that now:)