executeMacro
Function #
Function Signature:
executeMacro(directionInput, executeButton, frames, buttonType)
Description:
Executes a macro in TekkenScript, simulating inputs for the game by specifying direction, button presses, and durations.
Parameters:
directionInput: Direction Input
- Type: Integer
- Description: Directional inputs for the macro, representing the movement or stance.
- Values:
Input.BACK
– Move backwardInput.DOWN
– Crouch or move downInput.FORWARD
– Move forwardInput.UP
– Jump or move up
executeButton: Execute Button
- Type: Integer
- Description: Buttons to be pressed or released during the macro execution.
- Values:
Input.L_HAND
– Left hand buttonInput.R_HAND
– Right hand buttonInput.L_KICK
– Left kick buttonInput.R_KICK
– Right kick button
frames: Duration
- Type: Integer
- Description: The number of frames during which the inputs are active.
buttonType: Button Action Type
- Type: Integer
- Description: Specifies the action to perform with the buttons.
- Values:
InputType.KEY_DOWN
– Press button downInputType.KEY_UP
– Release buttonInputType.KEY_PRESS
– Press and release button
Usage Example:
-- Move forward for 10 frames without pressing any buttons.
executeMacro(Input.FORWARD, 0, 10, InputType.KEY_DOWN)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Press the left hand button for 7 frames without any directional input.
executeMacro(0, Input.L_HAND, 7, InputType.KEY_PRESS)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Move forward and press the right hand button for 5 frames.
executeMacro(Input.FORWARD, Input.R_HAND, 5, InputType.KEY_PRESS)
-- Move forward and down, then press the left kick and right kick buttons for 8 frames, then release the buttons.
executeMacro(Input.FORWARD + Input.DOWN, Input.L_KICK + Input.R_KICK, 8, InputType.KEY_PRESS)
-- Move backward and press the left hand button for 6 frames, then release the left hand button.
executeMacro(Input.BACK, Input.L_HAND, 6, InputType.KEY_DOWN)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Move forward and press the left hand button for 5 frames, then release the left hand button.
executeMacro(Input.FORWARD, Input.L_HAND, 5, InputType.KEY_DOWN)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Move up and press the right hand button for 4 frames, then release the button.
executeMacro(Input.UP, Input.R_HAND, 4, InputType.KEY_DOWN)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Move forward and press both the left and right hand buttons together for 9 frames, then release both buttons.
executeMacro(Input.FORWARD, Input.L_HAND + Input.R_HAND, 9, InputType.KEY_DOWN)
-- Release all keys.
executeMacro(0, 0, 0, InputType.KEY_UP)
-- Press both the left and right kick buttons for 5 frames without any directional input.
executeMacro(0, Input.L_KICK + Input.R_KICK, 5, InputType.KEY_PRESS)
-- Move backward and down, then press the left hand and left kick buttons for 7 frames, then release both buttons.
executeMacro(Input.BACK + Input.DOWN, Input.L_HAND + Input.L_KICK, 7, InputType.KEY_PRESS)
Notes:
- Combine multiple direction and button inputs by using addition (
+
), as Lua does not support bitwise operations directly. - The
frames
parameter sets how long the inputs will remain active. - Select the appropriate
buttonType
to specify whether the button should be pressed, released, or toggled.