Why does my randomizer not work (Resolved thank you to helped me)

Ok, so i want to make a randomizer that randomizes the weapon the player gets using a trigger but it d9snt work. also my code is

set variaiable to random integer between 1 and 3
 if variable = 1
do broadcast message on chanel "zapper"
if varible = 2 
do broadcast message on channel quantum portal
if variable = 3
do broadcast message on channel pml

what happens is that if the varibale has a value of 1, it triggers 2 and 3 and if the value is 2 it triggers 3. I want it to only trigger 1 for it to be random

Have you double checked that the item granters have the right channels?

Also, can you moves this to Help and remove the tags.
I don’t think this is a bug and we don’t use the ideas tag for whatever reason.

Welcome to this crazy place called forums!
You’ll find a lot of love and support here if you follow the rules!
Check out forum-beginners and gimkit-beginners when you are ready to read some more guides!

1 Like

Yeah they are the right channels, i searched for a randomizer guide and i cannot find the else if block or whatever that is called but how do i find it :frowning:

I also tried this guide

But I cant find is there block code in a repeater

also thank for the wlecome.

maybe try “else if” I know “if” should work, but “else if” should too

you might not be using the right symbol
image
double check if its the correct symbol

I used that = symbol, but i cannot find the else if block, I only found the if block i looked through all the gate categories.

press the gear symbol
image
image

3 Likes

It works! i dragged the else if block to the bottom of the if block and my system works! Thank u so much @samaIomIom

1 Like

@justagimba
Does this work?

Button:
When clicked transmit on: Weapon Choosing

Trigger:
Trigger when receiving on: Weapon Choosing
Do this code:

Item Granter
Grant item when receiving on: zapper
Item: Zapper
Amount: 1

Item Granter
Grant item when receiving on: quantum portal
Item: Quantum Portal
Amount: 1

Item Granter
Grant item when receiving on: pml
Item: P.M.L
Amount: 1

2 Likes

yeah thank u too. (Extra char

@samalomlom
I write my whole miniguide and come back and see you fixed it in one click :sob:
(lol, jk)

If you need extra characters, then just put < > around lowercase letters…

@justagimba
you can put letters in between these < > with no spaces to bypass the character limit.

Thank you it works, chrysotom and harharharharhar83

2 Likes

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.