Here we continue the Obstacle Game Miniseries by adding the third set of obstacles. If you have arrived here without visitng the previous tutorials then you might want to start from the first one, or you can just jump right in.
In this tutorial you will:
- Build a greenhouse
- Add spinning saw blades that kill the player on contact
- Create an exploding Prop puzzle
Building A Greenhouse
Time to ramp up the difficulty to medium. In this obstacle, you will explore adding dangerous items to the level – spinning blades – as well as pyrotechnics!
Open the Library and select the Voxels tab.
Add the Grass (Jungle) Voxel to your Hotbar.
At the end of the corridor, use the Voxel tools to build some steps leading onto a wide open platform of Grass (Jungle) Voxels.
Build a pathway across the Grass (Jungle) in the Technical Grid Voxel. To do this, start by removing a strip of Voxels.
Open the Library and add the Technical Grid Voxel to your Hotbar.
Fill the gap with the Technical Grid Voxels to create a dramatic pathway.
You might want to spend some time designing your staircase and path here, or you can return to do this later.
This pathway will lead the player to Checkpoint3 (so they know where they are supposed to go), but we are going to put something in their way.
Adding The Spinning Saw Blades
Open the Library and navigate to the Meshes tab. Add the Saw Blade to your Hotbar and close the Library. Place a Saw Blade parallel to your path.
Open the Entity Editor for the Saw Blade.
Select “Add to Entity” and choose Add > Script > rotateAndMoveScript.
Use the same technique as the Elevator for Obstacle 1 to make this Saw Blade move backwards and forwards. Check the “Simulate” checkbox to test it whilst remaining in the Editor.
Change the value in the movementEnd so that the saw reaches the other end of the Grass (Jungle) Voxel floor. Change the timing to make the Saw Blade move faster ( and make it a bit more difficult)
It might be difficult to open the Entity Editor by looking at the moving saw blade. If this is the case, you can open the Entity Editor by looking at the blue shadow that remains in the place where the Saw Blade is positioned and pressing X.
Once you have configured the movementEnd values change the rotationEnd so that the saw is also rotating. Your end values should look something like these.
Make sure that bounce is checked.
Now to make it dangerous. Select “Add to Entity” again and add the deathCollisionScript.
The deathCollisionScript is used to kill the player if they touch an object (nasty). By adding it to the Saw Blade you have just made the saw blade lethal! Now that you have completed customising your deadly saw blade, uncheck simulate to stop the Saw Blade running amok whilst you continue to work on this obstacle.
Now to create a reason for the Player to get past the Saw Blade.
Creative Control: Efficient Use Of Traps
You can be efficient in using traps and danger by requiring the Player to get past it more than once – to reach something and double-back (as we saw in the Pad (Pressure) / Vault Door situation on the rooftop. Don’t do it too many times or the Player might find it boring.
Exploding Your Way Out
In this scenario, the Player will be reaching for a button that blows a hole in the wall and allows them to proceed.
Firstly, use the Library to add a Statue (Cemetery) Mesh to your Hotbar, and add it to your world on the other side of the Saw Blade from the path. This artefact will hold your detonator for the explosion.
Now use the Library to find the Giant Fans Mesh. This will be the “door” that explodes.
Add the Giant Fan at the end of your pathway through the Grass (Jungle) Voxels.
Use the Entity Editor to fine-tune it’s position and rotation. Make it block the walkway. You will build the walls around it shortly.
Add the HideShowScript Script to the Giant Fans Prop. It was installed with the SuperSmashNGrab Package.
To make the Giant Fans explode, you will need to download another pack from the Community.
Open the Library and navigate to the Community tab. Find the Pyro Pack and select Install.
Navigate to the Templates tab within the Library. Add the PyroCharge and PyroDetonator’s to your Hotbar and Close the Library.
Add three PyroCharges around the perimeter of the Giant Fans Mesh.
Add a PyroDetonator onto the front of your Statue (Cemetery) mesh.
Open the Entity Editor for the PyroDetonator.
Change the meshAsset Property to Door Switch.
Fine-tune the position of the PyroDetonator on the Statue (Cemetery) mesh.
By clipping it inside the Statue (Cemetery) you can make it look like it’s part of the Statue.
Now to hook it all up. With the Entity Editor for the PyroDetonator still open, click the “+” next to the onInteract Property.
Select the Giant Fans, ShowHide Script and the Hide() function.
In the pyroDetonator Script Properties, press the “+” next to the “charges” Property.
Press “+” until there are three array elements.
Now use the dropdown selection boxes to select the three PyroCharges you attached to your Giant Fans.
With this much functionality added, it’s a good idea to do a midway test before continuing. I would suggest moving your player startlocation into the area you’re currently working on, you can always move it back later on. When you preview your game and make sure that pressing the button here blows up the charges, and removes the Giant Fans Entity.
To finish this section you will add glass walls to the area and move Checkpoint3 to the other side of the Giant Fans.
You can choose to practice what you have learned so far to do this yourself, or continue following this guide for step-by-step instructions.
Use the Library to select the clear Glass Voxel.
Use the Voxel tools to build this area into a greenhouse by adding glass walls.
Start by building glass around the Giant Fans.
Use the Technical Grid Voxel to build a base for a glass wall around your Grass (Jungle).
Add the glass walls and a glass roof.
As you did for Checkpoint1 and Checkpoint2, locate Checkpoint3 and move it to just the other side of the Giant Fans.
Next Steps: Obstacle #4
Success! You have just added two new doors to your game. Now that you have presented your Player with a simple challenge you can start to ramp up the difficulty and move on to creating some more difficult obstacles.