I have a question is there a possibility where if u roll a certain number it spawn a gun from the dice if so can someone help me with that
There is a chip called Dice Get Result.
There are also black dice that can be toggled with Cv2.
Once the die is rolled, you can use a int Variable
to save the number rolled.
You can use the value in the int Variable
and hook it into a Value Integer Switch.
Hook the result into a Rec Room Object get First With Tag.
This will make the default tab swap into a String Value.
You can make your default tag the tag of index zero. For instance, if I had a sword and a bow’s tags in a list, and the bow was first, I’d put questbow
(or something like that, I’m not home.) into the default tab.
Hook the result of the Dice Get Result
into the “Match” Tab.
Configure the Value Integer Switch and add your index values (for my example, I’d do 0 and 1.)
Then, input your tags. For my example, I have a bow (0) and a sword (1). I’d put the tag of the bow in the 0 tab, and the tag of the bow in the 1 tab.
Then, you can use a Dice Get Roll Finished
to check If
it’s finished. (You can make the execution what you’d like. I’m not home and I haven’t experimented with the Dice to the extent that I know by heart.)
Then, you can use a Equip Object to Dominant Hand
to Equip the object (weapon in our case) from the Rec Room Object Get First With Tag.
You can toggle if you want it to Force Equip or Steal.
That’s it!
(Again, I’m not home. I’ll try to produce a diagram when I do get home though. Cheers!)
Useful