In this lesson, we'll be taking control of object using our keyboard, mouse and joystick. And I'm not going to cover everything about those sensors and the actuators cuz you'll come to know what each event does.
From previous lessons, you've learned how the basics of how to use the keyboard. If not lemme tell how you: add a keyboard sensor, press the field near Key you'll be asked to press a key, do it and connect a sensor. Now your actuator must be activated that is connected by the keyboard sensor when u trigger the keyboard sensor.
If you select All Keys, the actuator gets triggered whenever you press any button on your keyboard.
Used for making key combinations, let's say if you have Key: Left Shift and First Modifier: Left Ctrl, The actuator is triggered when you press Left Shift+Left Ctrl.
Same as First Modifier but creates addition key combination. Let's say if you keep the Second Modifier as Left Alt your actuator is triggered when you press Left Shift+Left Ctrl+Left Alt. Comes in handy fr.
Decides whether you want your keystrokes to be logged in a property. Setting your property to True allows you to log them and vice versa for False.
Asks on which property you want the keystrokes to be logged. This can be used to create cheats like thing for your game. still confused af? Download the project file and examine it or ask in the discord server. Oh you can refer the docs too.
Triggered when you press left mouse button.
Triggered when you press right mouse button.
Triggered when you press right middle button which is used for scrolling.
Triggered when you scroll you scrolling wheel up.
Triggered when you scroll you scrolling wheel down.
Used to detect the movement of the mouse. Can use this event to do FPS setup.
Triggered when you hover your mouse cursor on the object which has the mouse sensor.
Triggered when you hover your mouse cursor on object that has that specified property or a material. Enabling X-Ray helps you to see through objects. Masking helps you to mask the collision objects. Here, download the project file bro.
Events like Button 6, Button 7, Right Thumb Button and Left Thumb Button is for mouses that have extra buttons like the one below.
Joystick Index can be used with multiple joysticks. Index 0 stands for joystick one. Threshold minimum when the stick is moved. The more the threshold is, the less chances an event is triggered when the stick is moved.
These are used for the buttons like, A, B, X, Y, etc. for Xbox. You can also use the playstation controllers too.
This the button we press with our middle finger, decides whether the trigger should be left or right.
Trigger an event when the stick goes in horizontal or vertical axis. It can be the left stick or the right stick.
Trigger an event when the stick goes in a certain direction. It can be the left stick or the right stick.
Mode has two modes. Visibility and Look.
Sets the visibility of the mouse cursor. When the button is highlighted, the cursor is visible when the game runs. Vice versa when the button is grayed out.
Makes the object look around accordingly when you move the mouse cursor. Well explained here.
*testing*