Tutorial 28: Controller Inputs

Learn to exert control over your creations!

 

 

The final two sub-headings in the Triggers & Events category have to do with the controller. There is a tool in each category associated with the triggers, bumpers, A, X and Y buttons as well as every direction on both analogue sticks (keep in mind that in the game A and Right Trigger perform the same action, X and left trigger do as well  so there is only one tool for each pair).

 

These tools can be used to disable those inputs, make them constantly on or even use them for something else entirely. Since they all do basically the same thing we won’t look at them all but let’s spawn one in the editor so we can see what we’ve got in those properties.

 

-Our first option is “controller,” this of course determines which controller the tool is affecting.

 

-Next we have “state.” The state refers to how that particular button or stick affects the bike, so default means the button works as normal.Stuck means that the button is affectively always on so with for example the A/RT button the gas will be constantly applied like in the Cruise Control skill game. Disabled, of course means that that input will no longer affects the bike or rider at all.

 

-The next three options all basically turn that controller input into a trigger that sends an impulse.

            -Use “On Press” to select the event or filter you want to activate when the button is pressed.

            -“On Down” will send an impulse every tick as long as the button is being held down.

            -And “On Release” will of course send an impulse when the button is released.

            -You can choose just one or all three depending on what you want to do.

 

With the left and right analogue sticks we also have one extra option. There are 8 tools for each stick, up, down, left, right and 4 diagonals. With up down left and right you get the added option of including the diagonals so that for example pressing the left and up diagonal will still activate the left action.