connect the output pin to the first pin of minor node (<) and your function’s pin to the second one. Connect the boolean pin to your output pin and is done.
i have so a spawner spawns 3 different actors into game depending on chance, i want to have a custom function determen what the chance is every time the function gets call, for ex
Well that’s the problem with wanting something to happen a certain percentage of the time, isn’t it? There’s a chance you’ll get a 100 misses in a row, but that’s just the way it works.
Can you elaborate on how this works better than the other proposed solutions? It seems like a more convoluted way to achieve the result and more prone to errors as well.
This one give a COMPLETELY DIFFERENT result. It take in input a table of %, generate a random int and return one of the indexes. If the element is bigger than an other there’s a higher chance to get it and you CAN’T spawn nothing. Actually it works (fine) only if the sum of the elements of the array is 100, if the Random integer in range node get in the max pin the sum of the elements it become flawless, but in the answer he asked the percentage off 100 and I forgot to improve it.
You was a little vague describing your problem, I’m not sure if this is what you want, BTW this randomly chooses one of the three depending on the percentage.