GlovePIE Script for Bastion: Using an Xbox 360 controller for the PC

Bastion has won more than a 100 awards since its release in August 2011. It’s an iconic game that gets everything right. It’s available for download on XBLA, PC (Steam) and the Chrome Web Store. If you prefer the Xbox controller but want to play it on your PC, here’s the GlovePIE script to do so.

GlovePie (Glove Programmable Input Emulator) is a free and easy to use application that utilizes customized scripts (which you can write) to emulate keyboard, mouse or joystick input, using a variety of other devices. It was originally designed to be used with the Essential Reality P5 Glove, but it now supports emulation of all kinds of input and devices. Not all games support controllers, but using a Glovepie script can make it possible to swap from mouse and keyboard to an Xbox 360 controller even when games do not support this option.


GlovePIE Script for Bastion

Copy and paste the text below into a GlovePIE document, press and run and play.

// Bastion controls for Xbox 360 Controller

//Movement – Left Stick
W = XInput1.Joy1Y > 0.2
S = XInput1.Joy1Y < -0.2
A = XInput1.Joy1X < -0.2 D = XInput1.Joy1X > 0.2

// Mouse Pointer Control
Mouse.DirectInputX = Mouse.DirectInputX + 10*deadzone(XInput1.Joy2X)
Mouse.DirectInputY = Mouse.DirectInputY – 10*deadzone(XInput1.Joy2Y)

//Mouse Buttons – attack 1 and attack 2
Mouse.LeftButton = XInput1.B
Mouse.RightButton = XInput1.X

// 360 Bumpers Next target previous target
keyboard.PgUp = XInput1.LeftShoulder
keyboard.PgDn = XInput1.RightShoulder

//360 Triggers: Secret skill and defend
keyboard.Q = XInput1.RightTrigger //Mouse Left Button to Right Trigger
keyboard.shift = XInput1.LeftTrigger //Mouse Right Button to Left Trigger

//360 Buttons Evade and Heal = XInput1.A
keyboard.F = XInput1.Y
keyboard.shift = XInput1.X

//dPad Movement
keyboard.W = Xinput1.Up
keyboard.D = Xinput1.Right
keyboard.S = Xinput1.Down
keyboard.A = Xinput1.Left

//Start and Select
keyboard.esc = XInput1.start = XInput1.back

//Reload mapped to LS click and use item to RS click
Key.R = XInput1.LeftThumb
Key.E = XInput1.RightThumb

Alternative Mapping

If you prefer playing with a keypad, button mapping couldn’t be easier. Our Bastion keymap for one handed players on the Razer Nostromo N52te can be found here.

Was This Post Helpful:

0 votes, 0 avg. rating


  1. Er 19/08/2014 at 3:33 pm - Reply

    for some reason I get “3: end of line expected (instead of “I”)” on

    Mouse.DirectInputY = Mouse.DirectInputY – 10*deadzone(XInput1.Joy2Y)

    the “I” it refers to seems to be the second in “Mouse.DirectInputY”

    Why? 🙁

    • Er 19/08/2014 at 3:35 pm Reply

      selfreply… for some reason one has to delete the “-” and rewrite it himself Then it works… for some reason^^

      • Chris 20/08/2014 at 12:27 pm Reply

        Asked and answered yourself 🙂 Thankyou! Glovepie has an excellent set of abilities but can be somewhat quirky or different hardware setups. Add to this the fact that its documentation is rather confusing and it can take a fair amount of effort to get it working properly. It is usually worth the time and effort though.

Leave a Reply