Setting a variable problem : Can't get correct subtraction

I have a variable set in an interface: [conch current level] (the interface is added to player, and overlap object)

On the Player variable I have the value set to 4. On the Overlap object I have this:

I’m lost now. This SHOULD remove 1 from the current level and make it 3 (then the player can interact with lvl3 object) BUT it set’s the value to 0.

What actor are these nodes in? The conch current level in this actor has no connection to conch current level in PlayerCrabBP, it will always set it to the same value, which is, whatever conch current level is (in that actor) minus one. What is the value of conc current level in that actor, and how are you setting it?

If you wanted to reduce Conch Current Level in the PlayerCrabBP by one, you should drag of from the cast, get ConchCurrentLevel, minus one from it, and then set it - again, from the cast

Conch Current level on THIS object (overlap pickup) is set to 0 in variable. It is set to 4 on the playerBP.

I can only get a ‘set’ when dragging from the cast.

Well, 0 - 1 = -1, the clamp makes it 0, so its always 0.

You drag off and type "get conch it doesn’t show in the list?

edit: drag off from the return value, not the exec

Brilliant! Thanks a lot Mosel3y, saved the day!

I’m a noob… I’m picking stuff up and hacking my way through it. I got the clamp from a health hud vid tut, I thought it simply kept the number from going over the max or below zero. Still a lot to learn but I’ll keep that in mind :wink:

(In reality I don’t need to make that number drop, but was having hard time with more complicated pick up adding to the value… so simple item to remove as a test :smiley: )