How will this help?
This detailed guide will help you enhance your gaming experience by creating intuitive scripts for various actions performed while playing.
This article will answer the following questions:
- What commands are available on BlueStacks for running scripts
- How to open the Controls Editor to create a script
- How to use the Controls Editor to create a script
Before reading further, watch this video to know how to use scripts on BlueStacks.
Commands on BlueStacks for running scripts
Scripts are sequences of actions (such as keystrokes, mouse clicks, delays, etc) that can be triggered by a specific key. It’s a powerful feature to extend the existing key mapping control. You can define any action sequence as you want and activate them using your own special key.
Here are the commands available for scripts on BlueStacks:
Higher Level Primitives.
Opening the Controls Editor to create a script
To create a script, you need to launch the game for which you want to create scripts and then, open the Controls Editor. Choose your version of BlueStacks below to know how to access the Controls Editor:
For BlueStacks 4.230 and above
There are two ways to access the Controls Editor on BlueStacks 4.230:
- By right-clicking on the Game Controls icon on the side toolbar while playing a game, as shown below.
- By left-clicking on the Game controls icon and selecting Open advanced editor from the menu.
For BlueStacks 4.220 and below
- Click on the keyboard control icon on the side toolbar, as shown below.
Using the Controls Editor to create a script
When you open the Controls Editor, a new window will appear alongside, as shown below. You will be presented with various options for the types of key controls you wish to create.
1. To create a script, drag the script button from the Add Controls menu and drop it on a functional area. For explanation purposes, let us drop it on the bag icon at the bottom left corner, as displayed in the image below.
2. Now, assign a key for this function. Here, the TAB button is assigned to initiate the command added as a script.
3. Click on the "<\>" icon under the script button to start adding the commands for this Script.
4. Once you click on the "<\>" icon, the cursor coordinates will start showing on the screen. When you right-click on a spot on the screen, the coordinates for that point will be shown in the script editor, as displayed below.
Here, the right-click was done on the bag icon.
5. You can start adding scripting commands against the coordinates displayed.
Here, the command:
tap against the coordinates means that when we press TAB it will tap once on the bag icon.
exitShoot against the coordinates means that when we press TAB it will exit Shooting mode in the game.
After adding commands, click on the done button.
6. Click on Save changes.
7. Once the changes saved, you can close the Controls Editor by clicking on X, as shown below.
8. Once the above steps are complete, you can see the changes reflect in the game.
In the below screenshot the player is in Shooting mode.
Once, TAB is pressed the bag will open and the player will come out of Shooting mode.
Thank you for choosing BlueStacks. We hope you enjoy using it. If you have any further questions, please contact us at email@example.com. Happy Gaming!
Last updated on October 12, 2020.