The Conditional Button device can only be triggered when a player carries one or more specific items. You can register any required items to the device.
You'll find multiple examples here of fun ways to make conditional buttons an integral part of your gameplay! Also note that each example is a little more complex than the one before it, so if you're new to Fortnite Creative, start with the first example to build your creative skills!
Example 1: Locked Door
A common use for a conditional button is to create a locked door that can be opened with a specific item — for instance, a keycard. This is useful in many situations, such as when creating new puzzles or games where exploration is a basic mechanic.
Devices Used
- 1 x Conditional Button device
- 1 x Lock device
Build Steps
-
Go to the Prefabs category in the Content browser and search for Blue House. Place the entire structure on your island, then find the front door.
-
Find the Lock device under the Devices category on the Content browser, then place it on the doorframe. Make sure that the lock touches the building and that the light on the lock is blue as this indicates that it successfully connected to the door.
- Open the door and go inside, then place a Conditional Button device on the other side of the door.
- Without moving away from the conditional button, go to the Items category in the Content browser, and search for keycard. Click the keycard item you want to use, then click Drop to register it to the Conditional Button device.
- Direct event binding is how you set devices to communicate directly with other devices. This involves setting functions or events for the devices involved. Open the Customize panel for the conditional button, then set the following event.
-
Open the Customize panel for the conditional button, then set the following event.
This tells the conditional button to open the lock device when it's activated.
-
From the Items category, select the keycard you just registered with the Conditional Button device, then click Add to Chest. This will put the keycard into a chest.
-
After you add one or more items to the chest, go to the Chest category and click Create Chest. The chest will be added to your island.
A player can now take the keycard from the chest to unlock the door!
Design Tips
Think about other ways you could use a locked door:
- A single player survival map where the player needs to search through an abandoned warehouse to find a key that opens the door to a huge supply cache.
- Players must eliminate a certain number of enemies in an area to gather enough materials to open a door to a new section of gameplay.
Find creative ways to implement this simple combination of devices!
Example 2: Craft a Gun
Conditional Button devices can require the player to provide multiple items before it's triggered.
In this example, you will learn how to create a simple system for the player to craft a gun using building materials.
Devices Used
- 1 x Conditional Button device
- 1 x Item Granter device
Build Steps
- Set up your island with sources of three building materials: wood, stone, and metal. You can use any props you want as long as they are made of these materials.
- Place an Item Granter device.
- While standing near the item granter, drop a pistol from the Weapons category on the Content browser to register the weapon to the item granter.
-
Place a Conditional Button device and customize it.
Option Value Description Number of Key Item Slots 3 This lets you register three different key items. Key Items Required 100 Each key item will require 100 to activate the button. Second Key Items Required 100 See Key Items Required above. Third Key Items Required 100 See Key Items Required above. - While standing near the Conditional Button device, go to the Items category in the Content browser, then find and drop wood, stone, and metal to register the materials to the device.
-
Configure a conditional button event to grant the pistol from the item granter to the player when the device is activated.
(w:600)
This tells the item granter to grant the pistol to the player when the conditional button has all the items it needs to trigger.
Design Tip
Using multiple different key items opens up new uses for the Conditional Button device.
Crafting is a fun addition to many different game genres, including farming and survival games. This crafting system could be extended into a more robust system with many different ingredients and outputs, potentially even with certain outputs serving as ingredients for different recipes.
Example 3: Upgrade a System
Many games use a currency system to reward players and allow them to purchase different items and upgrades. The Conditional Button device is one way to achieve a working upgrade system.
You can use Billboard devices to label your conditional buttons for the player.
Devices Used
- 2 x Item Granter devices
- 1 x Player Spawner device
- 1 x Creature Spawner device
- 1 x Elimination Manager device
- 1 x Health Powerup device
- 2 x Conditional Button devices
Build Steps
- Place an Item Granter device and name it Pistol Item Granter. Drop a pistol while standing near it to register the weapon to the device.
- lace a Player Spawner device where you want the player to spawn.
-
Configure the player spawner with an event that grants the player a pistol when they spawn. (You will set up the option later for players to purchase an upgraded weapon.)
- Place a Creature Spawner device away from the player’s spawn area.
- Place an Elimination Manager device, then drop a stack of gold while standing near it to register the gold to the device.
-
Place a Health Powerup device and customize it:
Option Value Description Effect Magnitude 100 How much health the player gets when this device is activated. Respawn No Once used, the powerup will not respawn. Spawn on Mini-Game Start No This powerup should not spawn until the player activates it. The Health Powerup will restore all of the player’s health, but will not spawn until triggered by another device. As you continue through this example, you will set this up so a player can purchase the health upgrade for 1,000 gold.
- Place a second Item Granter device, rename it Assault Rifle Item Granter, then drop an assault rifle while standing near it to register the weapon to the device. You will set up this upgrade so a player can purchase it for 2,500 gold.
-
Place a Conditional Button device and name it Health Conditional Button. Customize the Key Items Required option to 1,000. This will be used to restore a player's health when a player uses 1,000 gold.
-
Set an event on this device that spawns the Health Powerup when activated.
-
Place a second conditional button and name it Upgrade Conditional Button. Set the Key Items Required to 2.500. This will be used to upgrade a player's weapon when a player has 2.500 gold.
-
Set an event on this button that activates the Assault Rifle Item Granter to Grant Item when activated.
- Register gold to each of the conditional buttons from the Items category.
Design Tip
The core functionality of an upgrade system can be extended to create all kinds of new and exciting gameplay. Explore ways in which different devices can be connected to this system.
For example, a player could purchase upgrades that provide additional ammo or other resources, friendly guards to fight alongside them, or even access to a vehicle!