Shotty1 is a variable
Button1 is an button_device in the island
whenever Button1
is pressed, It will add +1 for Shotty1
. And the same happens with Shotty2
when button2
is pressed.
When the voting period ends, If shotty1
is greater than shotty2 it grants a shotgun and it would grant a different shotgun if shotty2
was greater.
But what happens when they both are equal? that’s when I tried to use GetRandomInt
to randomly choose between Shotty1 and Shotty2. Here is the screen shot:
BUT… the problem is… whenever the voting is calculated and weapons are being granted, Both Shotty1 and Shotty2 are granted. I have no idea why this happens and came to the conclusion that I’m using GetRandomInt
wrong.
If anybody know why this is happening please let me know, I would appreciate any replies