How will this help?
You can create a script, which can essentially perform a sequence of in-game actions (e.g keystrokes, mouse clicks, delays etc) which are triggered by a specific key that you can assign while creating it.
By using a script, you can further enhance existing key controls. It is a powerful feature to enhance your gameplay experience using which you can define any action sequence as you want and activate them using your own special key.
Click on the links below to learn more about how to use scripts effectively.
What commands are used for running scripts on BlueStacks?
Commands available for scripts on BlueStacks
Higher Level Primitives
How can I create a script?
As an example we will show you how to create a script in Free Fire MAX to open the Bag and exit Shooting mode.
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 "Controls editor" from the dropdown menu.
3. To create a script, drag the script button and drop it on a functional area. As an example, let us drop it beside the Bag button at the left side of your screen, as illustrated below.
NOTE: You can drag and place the script key control anywhere on the screen.
4. Now, assign a key for this function. Here, the "CapsLock" 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.
6. Now right-click on a spot on the screen for the in-game action for which you are adding the Script. Here, the right-click was done on the Bag button, as shown below.
Once you right-click on a spot on the screen, the coordinates for that point will be shown in the Script editor on the right side of your screen, as displayed below.
7. 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 CapsLock, it will tap once on the Bag button.
- The command "exitShoot" against the coordinates means that when we press CapsLock, it will exit Shooting mode in the game.
After adding the commands, click on "Done".
8. On the next screen, click on "Save". Once the changes are saved, you can close the Controls Editor.
9. 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. Happy Gaming!