DecrementInt subtracting 2 instead of 1? Wtf?!

Hey,

I do not see the same result. This is what is going on for me:

The log in the image reads from bottom to top (the order that they were printing out in).

Can you give me any more information in relation to your problem?

Thanks.

I am at my wit’s end with this. I have, in a blueprint, a macro that uses “decrementint” to subtract one from the value of an integer. But every time it fires, it subtracts two! Why is this happening?

The script with the decrementint node is inside of a macro. This macro is fired by a multigate. The way I’ve set it up, when it’s the AI’s turn, the multigate will fire, giving a 75% chance of a hit (decreasing the player’s hp by one), and a 25% chace of a miss (leaves the player’s hp as it is).

For some reason which I cannot fathom, when the “hit” macro fires, it decreases the player’s HP by two. To make it even more annoying, when the “miss” node fires, it decreases the player’s hp by one, despite the fact that the miss macro in no way even references the Player HP integer.

Here are the images. First is the multigate, second is the “hit” macro", second is the “miss” macro

Hey,

My thought is that because you never reset the multigate, it will use 0-3 and then because loop is checked, reset back to having all 0-3 again.

Here is some documentation on the multigate:

[https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/FlowControl/#multigate][1]

As an alternative, can you try this instead of the multigate?