How Do I get points for touching Static Meshes

Hi All, I am new to UE4, and I could never figure this out for UE 3 either. If I place various static meshes throughout my level how do I set it to give you a certain amount of points for touching the static mesh? What I am trying to do is a Hazard training simulation to where a person will walk throughout the level and if they see a work hazard(static mesh), they can walk up and touch it then the static mesh, it will disappear and give you a certain amount of points, when you reach a certain amount of points, it will take you to the next room. Please if someone can guide me towards how to do this, I am willing to pay you for helping me figure this out. Thanks. Please help!

I would use collision boxes surrounding the offending mesh. On player collide, do something

Is there like a tutorial I can follow to do this? I don’t know how to say on player collide, make object disappear and assign 5 points… when you equal 25 points, display message level complete and unlock a door to the next section.

That’s pretty easy to create:

  1. create an actor bp and add your mesh + a collision volume in your component tab
  2. now set the collision volume to just “overlap” (in the details panel) and get a “on begin overlap” event
  3. after that create a variable in your gamemode (e.g points)
  4. in your actor bp cast to the gamemode and get a “set” node from the point variable + increase it by X amount of points when the player touches the collision volume (the on being overlap event) -> so a set node and a “+” node (connect a “get” node from the point variable with one of the + links and on the other one add a value -> then it will always add X points to the existing points variable value)

Now place them in your level and when the player touches one of those things, it will add X points to the variable. :slight_smile:

?v=aJtTvYXOntY

I’m so lost. I got lost after your #3 create a variable. Number 4 I am completely lost as to what to do. See attached this is where I’m at.

OK So I added this, but when I compile and play, I walk up to the surge protector and touch it and it doesn’t disappear. What am I doing wrong?

I THINK I got it to work now, but with only 1 static mesh, the surge, but when I try to add in a second one to the blueprint, it only allows one “branch” to connect back to the EventActorBegin Overlap? How do I do multiple meshes?

Use a “sequence node” :slight_smile:

But normally you dont have to add more meshes (depends on what exactly you want to do) -> just place the actor bp several times in your map and then the player can collect all of them

well its going to be like 30 different static meshes, not the same one

When they all should be place in the map + add points, you will have to create separate blueprints for them :slight_smile:
Otherwise you will place one big actor bp and you can modify the position of the individual meshes

The only way I figured out so far is by doing this, but it will get messy as I add in more and more static meshes to touch.