How will this help?
With BlueStacks 5.2 and above, you can now enhance your gaming experience by creating intuitive scripts for various actions performed while playing.
This detailed article will guide you on how to use scripts effectively. It will explain:
Commands used for running scripts on BlueStacks
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.
Commands available for scripts on BlueStacks:
Higher Level Primitives:
How can I create a script?
1. First, launch the game on BlueStacks for which you want to create scripts.
2. After the game launches, click on the "Game controls" icon from the Side Toolbar and select "Open advanced editor" from the dropdown menu.
3. To create a script, drag the script button and drop it on a functional area. For explanation purposes, let us drop it on the Bag button at the bottom left, as illustrated below.
4. Now, assign a key for this function. Here, the "Tab" key is assigned to initiate the command added as a script.
5. Click on the "<\>" icon under the script button to start adding the commands for this Script.
4. This will open the Script editor on the right side of your game 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 button.
5. You can start adding scripting commands next to the coordinates in the Script editor, as shown below.
- The command "tap" against the coordinates means that when we press Tab, it will tap once on the Bag button.
- The command "exitShoot" against the coordinates means that when we press Tab, it will exit Shooting mode in the game.
6. After adding the commands, click on "Done".
7. On the next screen, click on "Save". Once the changes are saved, you can close the Controls Editor.
8. You can now see the changes reflect in the game.
The illustration below shows the player is in Shooting mode. Upon pressing Tab, the Bag button is tapped and the player exits 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!