RPG Crit System.

I am trying to figure out a crit system, and I was wondering if there is a node that branches of (not a branch node) X % of the time. For example while executing a certain function, a node that splits in to how ever many PINS you add, but all nodes = to 1 (or 100%). So each pin has a chance of executing. Right now what i am doing is I am using a time line with a delay. And the delay has a random float within range with vairables attached to them so i can edit them in game later. And when the delay finishes it sets a boolean true that allows me to crit, and at the end of the crit sets the boolean to false, and then does normal damage if that makes sense. And this works. But i was wondering if there is a better way of doing it that acts more like a Percentage rather than setting random delays within a range?

Thanks in advance!


This should work

Thank you for replying! I am not sure how to use this or where to put it =/
And dont know how to get those Input and Output nodes, Im still new to this stuff.

created what is called a “Macro”.

Macro allow us to create nodes.

Here misspelled “Chance” and “Change”.

Right now, he can right-click on the Blueprint he created the macro in and type the name of his macro. That gives him a new node with an input and an output. The input node asks for a Critical Chance (from 0 to 100), the output gives a boolean that says false = no critic, true = critical.

You don’t necessarily have to create a macro to make a critical system. But that’s one way to do it if you think you’re going to need to call this “CalculateCriticalMacro” really often.

The node you’re looking for is simply “Random float (or Int) in Range”.

Oh wow, so much easier lol. I got it implemented, and it works. When i set the macro to 100 it crits every time, which is how it should work. But when i set it to 0, it still crits some of the times, but not as often. Know why it does that? Shouldnt it crit 0 times if i set the macro to 0? Thanks again for all the replies.

EDIT: Ok i think i just answered my own question. The reason why it crits some of the time is because the macro simply says IF X is >= any number between 0-100 then crit = TRUE. Which means if i set it = to 0, which would be >= 0 it still has a chance of it hitting 0 which would then be true and then crit. So i think i should set the min value in the macro to 1. I GOT IT! This stuff is making a lot more sense to me now. And macros are awesome now. TY

Consider this thread solved haha.

EDIT 2.0: WOW this works perfect Thank you for showing me this.

I’m glad we helped you out :slight_smile: