Tutorials#2 – Dreams simple jetpack
Articles Blog

Tutorials#2 – Dreams simple jetpack

August 24, 2019


Today I will show you how to make a simple jetpack. Here we have a scene I have set up. As you can see there is some logic involved. Don’t be scared I will guide you through it. First lets have a look at the jetpack logic. I have made a trigger zone which is set on the jetpack This will detect if the player is currently controlling the character. If that is true set the controller for the jetpack on. Make sure you are scoped in the jetpack. So you need place a trigger zone. Open it and place the collider at the right position. Place a controller gadget and drag the wire- from the trigger zone in the controllers power button. So that the trigger zone will set the controller on. Make sure that the controller gadget is set to remote. So that the player can interact with it even though the player does not posses the jetpack. Once you have done that. You will need to place a advanced mover. Set all the axes to 0 except for the y axis. Then drag a wire from the X button(cross button) to the on/off button from the advanced mover. Now you will have a player that can fly infinite. That is not a nice mechanic gameplay wise. So we will add fuel and a place where the player can gain fuel. First we will make the fuel. Add some variables, variable modifiers, and-gates, calculators and a number displayer. Like I have right here. Once that is done. You will need to set the modify variables to add. In order to increase or decrease the fuel. Once that is done. You will have to connect the greather than calculator, and the less than calculator each to a separate and-gate. Connect the X button from your controller gadget to the and gate with the greather than calculator. Connect the and-gate to value modifier with -1. Make sure you have set the modifier to add. And that it modifies the fuel variable. Now you will see the fuel decrease once you press the X button. Once that is done.(again?) You will need to add a variable call it fuel. So you can find it back later. First connect the fuel to a number displayer. So you can see the output on the screen. Then connect the fuel variable to two calculators. Set one greater than with operand B as 0. Set the other one to less than with operand B as 100. You have to set these so that you will not have a fuel that can go higher than 100 and less than 0. Now add a value detect player. I will explain why later. just place it for now. Connect it to a greather than calculator. Set operand B to 0. Now connect the calculator to the and-gate with the less than calculator. Then you need to connect the and-gate to the variable modifier with 1. Make sure that the variable modifier is set to add. And that it modifies the fuel variable. Now you will not see your fuel added yet. So lets add a pad which will add fuel to our jetpack. Here we have the logic for the landing pad. It will need to detect the player. In order to do that we add a trigger zone. Adjust the zone to the size of your pad. Then we will add two modifiers. Set them both to set. And make sure they are modifying the detect player value. That is the value you made earlier. Set one modifier to 0 and the other to 1. At least a value greater than 0. 0.1 will also work, but that does not look nice and it is a weird number. Then connect the triggerzone to the modifier with value 1. And an invertor(not-gate). Then connect the invertor to the modifier with value 0. This will set the detect player to 0. When the player is not detected. Now for some fancy stuff add an emitter. Which will emit a single paint stroke. Tweak it and add it to the emitter. Then you connect the trigger zone to the emitter and the stroke will only be emitted when the player stands on it. Now you can make a dream with a jetpack.

Leave a Reply

Your email address will not be published. Required fields are marked *