The Random Number Generator is a device you can use to generate a random result from a range of numbers, then trigger other devices based on that random result.
Using this device to reduce predictability adds surprise and excitement to an island, which, in turn, can extend the life of the content you create.
The device turns picking a random number into a physical machine that helps users visualize the action. You can find endless uses for this device in your gameplay.
Let’s get started!
Design Example 1: Introducing the Device
Devices Used
1 x Random Number Generator device
3 x Item Spawner devices
3 x Trigger devices
3 x weapons
Overview
Add the Random Number Generator.
Add Item Spawners.
Add Triggers.
Place a Random Number Generator Device
The Random Number Generator consists of a base and an attached volume that extends off one side of the base.
Place the device somewhere with enough room that you can access the attached volume with no obstruction.
Note that the base of the device can act as a trigger for activating the Random Number Generator. If a player steps on the trigger, the device can be set to activate.
Use the following setting for the Random Number Generator:
The Zone Direction setting can be used to reposition the volume attached to the base. This can be helpful when trying to fit a Random Number Generator device in tight spaces on your island.
Now is a good time to examine the volume attached to the base of the device. Notice that it is divided into sections by thin white lines.
The number of sections is determined by the number of “winning” values that you configure in the device settings, and also by the value of the Length setting.
In this case, you have a minimum winning value of one and a maximum of three with a length of three. These settings mean that the volume is divided into three sections, each of which is one tile long.
If the base of the Random Number Generator has a number displayed on it, then the device is enabled. The number displayed on the base is the last number that the device rolled. Since you have a minimum value of one and a maximum value of three, the device can return a result of one, two, or three.
Try stepping on the base to watch the device pick a new winning number. Watch how the winning section of the attached volume flashes when a number is selected.
Other gameplay devices placed inside the winning section of the Random Number Generator can be activated when their segment of the volume is selected.
Add Item Spawners
Place Item Spawner devices next to each segment of the Random Number Generator volume.
Select three different weapons (any) and drop one on each of the Item Spawners to register the weapon with the device.
Use the following settings on each Item Spawner:
Add Trigger Devices
Place Triggers inside the volume of the Random Number Generator device, making sure that each trigger is placed in a separate section of the volume.
Use the following settings on each Trigger device:
Finally, use the Event system to bind each Trigger to one of the Item Spawners, like this:
Pay careful attention to the names of your devices — it will make it easier to connect them later!
Design Tips
When the player steps on the base of the Random Number Generator, one of the segments of the attached volume will be selected and the trigger inside will be activated, sending an event to the Item Spawner and telling it to spawn a weapon.
The settings in this example leave all the devices visible, but you could try making them invisible, or try other devices that could be triggered by the Rando Number Generator device.
Next, link the Item Granter to the Event system so that it activates when a player is spawned at the Player Spawner you placed using the following settings:
Design Example 2: More Ways to Use the Random Number Generator
The most exciting thing about the Random Number Generator device is how it can be used to change the gameplay on your islands. With some advance planning, you can give players a different experience each time they play.
Devices Used
1 x Player Spawner device
2 x Item Spawner devices
2 x Creature Placer devices
Overview
Add a Player Spawner device.
Add the Random Number Generator device.
Add three Item Spawners and Triggers.
Create a simple maze.
Add three Creature Placers and Triggers.
Configure the Player Spawner device.
Follow Design Example 1 above for the first three steps.
The remaining steps will result in spawning a random weapon, and are detailed below.
Create a Simple Maze
Add some walls to create a simple maze.
The layout doesn’t need to be complicated. The main goal is to leave some hidden corners where you can spawn monsters.dd Creature Placers
Place three Creature Placer devices, each in a different corner in your maze.
Use the following settings for the Creature Placer devices. Be sure to pick a different creature type for each spawner!
Copy the Trigger devices in each segment of the Random Number Generator device, making sure to place each copy in the same segment of the attached volume.
In the image above, we added small colored circles under each new trigger. This helps you remember which trigger does what!
Use these settings for the copied Trigger devices.
Set the Events so that each Trigger will enable a Creature Placer when it is activated by the Random Number Generator device.
Remember to connect each trigger to a different Creature Placer device in your maze!
Configure the Random Number Generator
Configure the Random Number Generator so that your maze of monsters is activated when the player spawns, along with a weapon to fight whatever monsters awaits!
Change one function on the Random Number Generator device so that it is activated by the Player Spawner device.
Change the settings on the Random Number Generator so that it only triggers once by changing the Reset After Use value to OFF.
Design Tips
And there you have it — a maze filled with monsters! Each time a player spawns, they are given a different weapon to meet the threat!
To expand this example, make the maze bigger and try adding multiple monsters. You can also change the weapons that are spawned, or even add other gear or powerups to help players explore your maze.
Design Example 3: Even More Fun Stuff!
The most exciting thing about the Random Number Generator device is how it can be used to change the gameplay on your islands. With a little planning, you can give players a different experience each time they play.
In this example, you'll create a section of gameplay that features dangerous piston-like towers that smash up and down onto the ground. Players must dodge the columns to move through the area, but this is made more difficult by the fact that the Random Number Generator switches which columns are active when the player approaches.
Devices Used
1 x Player Spawner device
1 x Random Number Generator device
6 x Trigger devices
12 x Prop Mover devices
1 x Audio Player device
Overview
Add a Player Spawner and a Random Number Generator.
Add the moving columns and Prop Movers.
Add six Triggers.
Add the Audio Player.
Add Player Spawner and Random Number Generator
Start with a Player Spawner device, configured so that it can be used as the island Start Point.
Add a Random Number Generator device, configuring it to use three segments in its attached volume.
The Random Number Generator is configured so that it will activate as soon as the game starts.
Add Columns and Prop Mover Devices
Place a number of columns in a constrained space. For this example, you will change the colors of the primitive shapes to help differentiate which of the three groups they belong to.
Add a small primitive object at the base of each column so players can see where the columns will strike when they drop to the ground.
Add a Prop Mover device to the top of each column.
Rotate the Prop Mover device so that the arrow, which indicates which way the prop will move, points straight up.
Use the following settings to configure the Prop Mover devices:
Choose the names of your devices carefully!
Add the Triggers
Place two Trigger devices into each of the three segments of the Random Number Generator volume.
For reference, place a small colored primitive object beneath each Trigger so that it is easier to track the group of columns that each trigger controls.
Configure the Triggers using these settings:
Configure each Trigger to send Events to the associated Prop Mover devices on the columns using the following settings:
Repeat this process for each set of triggers in the volume.
Add the Audio Player Device
As a final touch, add an Audio Player into the middle of your field of moving columns so that they make a satisfying noise when they piston up and down.
Position the Audio Player in the center of the group of columns, and then use the following settings to configure the device:
Finally, configure the Events of one Prop Mover device from each of the three color groups to play the sound effect as the columns slam up and down, using the following settings:
Design Tips
And that’s it — a forest of smashing columns that move in different patterns every time a player visits the island!
To expand on this example, try adding sections of smashing columns to the mazes that you built for earlier examples in this series. And if the columns don’t seem dangerous enough, try scaling them up so that there is less space in between them!