From 24a0051b298dc0e13bca10edb44363285b9445ee Mon Sep 17 00:00:00 2001 From: Dummydude <96631251+Dummydud3@users.noreply.github.com> Date: Wed, 21 Jun 2023 20:44:31 -0400 Subject: [PATCH] Clarified Macro scipting Added more detailed instructions for your average user in laymen words. --- docs/Macros.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/Macros.md b/docs/Macros.md index 2484d7b..8e78b58 100644 --- a/docs/Macros.md +++ b/docs/Macros.md @@ -1,17 +1,27 @@ -# NXBT Macros +# Writing an NXBT Macro -## Writing an NXBT Macro +### Basic Macro script -Each NXBT macro line is composed of the buttons/sticks being set and the amount of time they are set for. A simple macro follows: +Every macro script is composed of Button/Stick input followed by a set duration. Here is a sample of this. ``` B 0.1s -0.1s ``` -The above macro is the B button being pressed for 0.1s and no controls being set for 0.1s. This is effectively a single B button press. +The above macro is setting the B button to be pressed for 0.1s (0.1 seconds). -A slightly more complicated example follows: +Oftentimes you'll need gaps between your inputs when no buttons should be pressed. This is easily scripted by making a new line and inserting a new time. + +``` +B 0.1s +1s +``` + +This is effectively a single B button press. NXBT will then wait 1 second before moving to the next action. + +### Advanced Macros + +To set multiple inputs simultaneously, we write our inputs on the same line, separated by a space, followed by the duration. This is how our script looks now. ``` A B 0.5s @@ -19,7 +29,7 @@ B 0.1s 0.1s ``` -This new macro, first, has both the A and the B button being pressed for 0.5s. Next, the A button is released and the B button continues to be held for an additional 0.1s. Finally, no controls are set for 0.1s. +First, This new macro has both the A and B buttons pressed for 0.5s. Next, the A button is released and the B button continues to be held for an additional 0.1s. Finally, no buttons are pressed for 0.1s. The above macros deal with only button-based input. A stick input example follows: