### Tekken Auto Script Lua Example Source: https://doc.tekkenscript.com/study/quick-start This Lua script provides an example of how to define functions for character-specific actions and game events within the Tekken Auto Script SDK. It includes a duck_whiff_punish function with conditional logic and an onAttackSuccess function to log attack events. Dependencies include the SDK's built-in functions like executeMacro and access to global objects like Input and InputType. ```lua return { duck_whiff_punish = function(self, enemy, frames) print("duck_whiff_punish:" .. frames) --Ignore the next attack Combo1 Start if frames < 13 then executeMacro(0, Input.L_HAND, 3, InputType.KEY_PRESS) executeMacro(0, Input.R_HAND, 3, InputType.KEY_PRESS) return end end, onAttackSuccess = function(self, enemy, frames) print("Attack succeeded! Enemy ID: " .. enemy.move_id) end } ``` -------------------------------- ### utils.IsAttackStarting Source: https://doc.tekkenscript.com/sdk/class/utils Checks if an attack is starting based on the move timer and startup frames. This function is useful for determining when an attack's startup sequence has completed. ```APIDOC ## GET /utils/IsAttackStarting ### Description Checks if an attack is starting based on the move timer and startup frames. ### Method GET ### Endpoint /utils/IsAttackStarting ### Parameters #### Path Parameters - **self** (table) - Required - The attack object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// attack properties" : "// attack values" } } ### Response #### Success Response (boolean) - **isAttackStarting** (boolean) - True if the attack is starting; otherwise, false. #### Response Example { "isAttackStarting": true } ``` -------------------------------- ### Check if Attack is Starting Source: https://doc.tekkenscript.com/sdk/class/utils Assesses if an attack is in its initial startup frames, based on the move's timer and its startup duration. This is useful for timing-sensitive actions or reactions. ```lua local result = utils.IsAttackStarting(self) ``` -------------------------------- ### Check if Attack is Starting Source: https://doc.tekkenscript.com/sdk/class/utils Determines if an attack is in its startup frames based on the move timer and startup frames. It takes the attack object and returns a boolean. This is useful for timing specific actions or counters during attack startup. ```lua local result = utils.is_starting_attack(self) ``` ```lua local isStartingAttack = utils.is_starting_attack(attack) print(isStartingAttack) -- Output: true or false ``` -------------------------------- ### utils.IsGettingHit Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the player is getting hit. This determines if a player is currently being hit. ```APIDOC ## GET /utils/IsGettingHit ### Description Checks if the player is getting hit. ### Method GET ### Endpoint /utils/IsGettingHit ### Parameters #### Path Parameters - **self** (table) - Required - The player object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// player properties" : "// player values" } } ### Response #### Success Response (boolean) - **isGettingHit** (boolean) - True if the player is getting hit; otherwise, false. #### Response Example { "isGettingHit": true } ``` -------------------------------- ### Check if Player Started Being Thrown Source: https://doc.tekkenscript.com/sdk/class/utils Determines if the player has initiated the 'being thrown' animation or state. It takes the player object as input and returns a boolean. This is important for interruptibility or specific counter-attack opportunities. ```lua local result = utils.IsStartedBeingThrown(self) ``` ```lua local startedBeingThrown = utils.IsStartedBeingThrown(player) print(startedBeingThrown) -- Output: true or false ``` -------------------------------- ### Get Active Frames of Attack/Move Source: https://doc.tekkenscript.com/sdk/class/utils Retrieves the number of active frames for the current attack or move. It requires the attack or move object and returns an integer. This is fundamental for understanding attack properties and timing. ```lua local frames = utils.GetActiveFrames(self) ``` ```lua local activeFrames = utils.GetActiveFrames(attack) print(activeFrames) -- Output: number of active frames ``` -------------------------------- ### Get Current Combo State Source: https://doc.tekkenscript.com/sdk/class/utils Retrieves the current combo state of the player. It takes the player object and returns the combo state information. This is vital for managing combo sequences and tracking combo damage scaling. ```lua local combo = utils.get_combo(self) ``` ```lua local comboState = utils.get_combo(player) print(comboState) -- Output: combo state ``` -------------------------------- ### Get Frame Advantage (FA) of Move Source: https://doc.tekkenscript.com/sdk/class/utils Retrieves the Frame Advantage (FA) value for a given move. It takes the move object and returns the FA value, which indicates whether the player is at an advantage or disadvantage on block. Essential for combo and pressure planning. ```lua local fa = utils.getFa(self) ``` ```lua local fa = utils.getFa(move) print(fa) -- Output: Frame Advantage value ``` -------------------------------- ### Check if Player is Getting Hit Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if the provided player object is currently in a state of receiving a hit. This can be used for various logic, such as preventing certain actions while being hit. ```lua local result = utils.IsGettingHit(self) ``` -------------------------------- ### Tekken Script: Whiff Punish and Attack Initialization Source: https://doc.tekkenscript.com/study/introduction This Lua script defines functions for automated gameplay in Tekken. It includes a 'duck_whiff_punish' function to execute a combo if an opponent's missed attack is within a certain frame window, and 'OnInitAttackProc' to initialize attack processing. The script also includes placeholder functions for various counter-attack scenarios. ```lua return { duck_whiff_punish = function(self, enemy, frames) print("duck_whiff_punish:" .. frames) -- duck whiff punish 13 frames below if frames < 13 then executeMacro(0, Input.L_HAND, 3, InputType.KEY_PRESS) executeMacro(0, Input.R_HAND, 3, InputType.KEY_PRESS) return end end, air_counters = function(self, enemy, frames) end, high_counters = function(self, enemy, frames) end, low_counters = function(self, enemy, frames) end, mid_counters = function(self, enemy, frames) end, onAttackCounter = function(self, enemy, frames) end, onAttackSuccess = function(self, enemy, frames) end, OnInitAttackProc = function(self, enemy, frames) print("Default ID:" .. enemy.move_id, self.char_id) end } ``` -------------------------------- ### Defining OnInitAttackProc Function in Lua Source: https://doc.tekkenscript.com/sdk/table/function The OnInitAttackProc function initializes attack processing by handling player and enemy information for status updates. It takes three parameters: self (current player object), enemy (PlayerSnapshot of the enemy), and frames (initialization timing). Outputs player details like move_id via print; no explicit return value, suitable for scripting hooks in Tekken games with Lua support. ```lua OnInitAttackProc = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### TekkenScript executeMacro Function Source: https://doc.tekkenscript.com/sdk/table/executeMacro The `executeMacro` function simulates inputs in TekkenScript. It takes directional input, buttons, duration in frames, and button action type as parameters. Inputs can be combined using addition. The `frames` parameter controls the duration of the input, and `buttonType` specifies whether to press, release, or toggle buttons. ```tekken executeMacro(directionInput, executeButton, frames, buttonType) ``` ```tekken -- 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) ``` -------------------------------- ### utils.IsOnGround Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the player is on the ground. This determines the player's ground status. ```APIDOC ## GET /utils/IsOnGround ### Description Checks if the player is on the ground. ### Method GET ### Endpoint /utils/IsOnGround ### Parameters #### Path Parameters - **self** (table) - Required - The player object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// player properties" : "// player values" } } ### Response #### Success Response (boolean) - **isOnGround** (boolean) - True if the player is on the ground; otherwise, false. #### Response Example { "isOnGround": true } ``` -------------------------------- ### utils.IsAttackLow Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the attack is a low attack. This identifies attacks that target the opponent's lower body. ```APIDOC ## GET /utils/IsAttackLow ### Description Checks if the attack is a low attack. ### Method GET ### Endpoint /utils/IsAttackLow ### Parameters #### Path Parameters - **self** (table) - Required - The attack object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// attack properties" : "// attack values" } } ### Response #### Success Response (boolean) - **isLow** (boolean) - True if the attack is low; otherwise, false. #### Response Example { "isLow": true } ``` -------------------------------- ### utils.CanCounter Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a counterattack can be performed based on various conditions. The function takes several parameters to evaluate the possibility of a counterattack. ```APIDOC ## GET /utils/CanCounter ### Description Determines if a counterattack can be performed based on various conditions. ### Method GET ### Endpoint /utils/CanCounter ### Parameters #### Path Parameters - **frames** (number) - Required - The number of frames the attack has. - **attacker** (table) - Required - The attacker object. - **receiver** (table) - Required - The receiver object. - **airborneOpp** (boolean) - Required - If the opponent is airborne. #### Query Parameters None #### Request Body None ### Request Example { "frames": 10, "attacker": { "// attacker properties" : "// attacker values" }, "receiver": { "// receiver properties" : "// receiver values" }, "airborneOpp": false } ### Response #### Success Response (boolean) - **canCounter** (boolean) - True if a counterattack is possible; otherwise, false. #### Response Example { "canCounter": true } ``` -------------------------------- ### Calculate attack impact frames (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Computes the number of frames until an attack impacts the opponent. Requires an attacker object. Returns an integer representing frames until impact. ```Lua local time = utils.GetTimeUntilImpact(attacker) ``` -------------------------------- ### utils.IsAttackMid Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the attack is a mid attack. This identifies attacks that target the opponent's midsection. ```APIDOC ## GET /utils/IsAttackMid ### Description Checks if the attack is a mid attack. ### Method GET ### Endpoint /utils/IsAttackMid ### Parameters #### Path Parameters - **self** (table) - Required - The attack object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// attack properties" : "// attack values" } } ### Response #### Success Response (boolean) - **isMid** (boolean) - True if the attack is mid; otherwise, false. #### Response Example { "isMid": true } ``` -------------------------------- ### Handle Mid Attack Counters Source: https://doc.tekkenscript.com/sdk/table/function This function is designated for managing counter-attacks against mid-level attacks. It is currently unimplemented and only prints the player's move ID. This placeholder can be populated with specific counter-attack routines. ```lua mid_counters = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### utils.IsAttackHigh Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the attack is a high attack. This identifies attacks that target the opponent's head or upper body. ```APIDOC ## GET /utils/IsAttackHigh ### Description Checks if the attack is a high attack. ### Method GET ### Endpoint /utils/IsAttackHigh ### Parameters #### Path Parameters - **self** (table) - Required - The attack object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// attack properties" : "// attack values" } } ### Response #### Success Response (boolean) - **isHigh** (boolean) - True if the attack is high; otherwise, false. #### Response Example { "isHigh": true } ``` -------------------------------- ### Check unblockable attack (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if an attack is unblockable. Requires an attack object. Returns a boolean indicating unblockable status. ```Lua local result = utils.IsAttackUnblockable(self) ``` -------------------------------- ### POST /character/mid_counters Source: https://doc.tekkenscript.com/sdk/table/function Handles counter actions against mid attacks. Currently not implemented but can be extended for specific mid attack counter strategies. ```APIDOC ## POST /character/mid_counters ### Description Handles counters against mid attacks. This function is currently not implemented but can be extended to handle specific counter actions against mid attacks. ### Method POST ### Endpoint /character/mid_counters ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the counter timing ### Request Example { "self": {}, "enemy": {}, "frames": 18 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the counter logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### POST /character/low_counters Source: https://doc.tekkenscript.com/sdk/table/function Handles counter actions against low attacks. Currently not implemented but can be extended for specific low attack counter strategies. ```APIDOC ## POST /character/low_counters ### Description Handles counters against low attacks. This function is currently not implemented but can be extended to handle specific counter actions against low attacks. ### Method POST ### Endpoint /character/low_counters ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the counter timing ### Request Example { "self": {}, "enemy": {}, "frames": 8 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the counter logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### Check punishable attack during crouch (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a player can punish an opponent's attack while crouching. Requires player and enemy objects as inputs. Returns a boolean indicating punishability. ```Lua local result = utils.IsWSpunish(self, enemy) ``` -------------------------------- ### POST /character/onAttackSuccess Source: https://doc.tekkenscript.com/sdk/table/function Handles actions when an attack is successful. Currently not implemented but can be extended for specific success-triggered responses. ```APIDOC ## POST /character/onAttackSuccess ### Description Handles actions when an attack is successful. This function is currently not implemented but can be extended to handle specific actions when an attack is successful. ### Method POST ### Endpoint /character/onAttackSuccess ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the success timing ### Request Example { "self": {}, "enemy": {}, "frames": 7 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the success logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### Check if Player Can Punish Attack Source: https://doc.tekkenscript.com/sdk/class/utils Determines if the player is in a position to punish an opponent's attack. It takes the player and attacker objects as input and returns a boolean indicating punishability. This is crucial for offensive and defensive strategy. ```lua local result = utils.IsPunish(self, attacker) ``` ```lua local canPunish = utils.IsPunish(player, attacker) print(canPunish) -- Output: true or false ``` -------------------------------- ### Handle Successful Attack Source: https://doc.tekkenscript.com/sdk/table/function This function handles the logic for when an attack successfully connects. It is currently not implemented and only logs the player's move ID. This function can be expanded to manage post-hit effects or combos. ```lua onAttackSuccess = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### POST /character/onAttackCounter Source: https://doc.tekkenscript.com/sdk/table/function Handles actions when an attack counter is triggered. Currently not implemented but can be extended for specific counter-triggered responses. ```APIDOC ## POST /character/onAttackCounter ### Description Handles actions when an attack counter is triggered. This function is currently not implemented but can be extended to handle specific actions when an attack counter is triggered. ### Method POST ### Endpoint /character/onAttackCounter ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the counter timing ### Request Example { "self": {}, "enemy": {}, "frames": 5 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the counter logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### Determine Counterattack Possibility Source: https://doc.tekkenscript.com/sdk/class/utils Evaluates whether a counterattack can be performed, considering the attack's frames, the attacker and receiver objects, and whether the opponent is airborne. This function is crucial for implementing counter-mechanics. ```lua local result = utils.CanCounter(frames, attacker, receiver, airborneOpp) ``` -------------------------------- ### utils.IsAttackThrow Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the attack is a throw. This function determines if the attack is a throwing attack. ```APIDOC ## GET /utils/IsAttackThrow ### Description Checks if the attack is a throw. ### Method GET ### Endpoint /utils/IsAttackThrow ### Parameters #### Path Parameters - **self** (table) - Required - The attack object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// attack properties" : "// attack values" } } ### Response #### Success Response (boolean) - **isThrow** (boolean) - True if the attack is a throw; otherwise, false. #### Response Example { "isThrow": true } ``` -------------------------------- ### Check crouch-back state (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if a player is in a crouch-back position. Requires a player object. Returns a boolean indicating crouch-back status. ```Lua local result = utils.IsCrouchBack(self) ``` -------------------------------- ### Check crouching state (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if a player is in a crouching position. Requires a player object. Returns a boolean indicating crouch status. ```Lua local result = utils.IsCrouching(self) ``` -------------------------------- ### Handle Low Attack Counters Source: https://doc.tekkenscript.com/sdk/table/function This function is intended for handling counter-attacks against low attacks. As of now, it is not implemented and only outputs the player's move ID. Future development can add specific logic for low attack counters. ```lua low_counters = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### Handle Air Counters Source: https://doc.tekkenscript.com/sdk/table/function This function is intended to handle counter-attacks against airborne opponents. Currently, it is not implemented and only prints the player's move ID. It serves as a placeholder for future logic. ```lua air_counters = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### POST /character/duck_whiff_punish Source: https://doc.tekkenscript.com/sdk/table/function Handles punishment when enemy whiffs an attack while player ducks. Simulates button presses based on frame timing for optimal counter responses. ```APIDOC ## POST /character/duck_whiff_punish ### Description Handles the punishment when the enemy whiffs an attack while the player ducks. If the frames parameter is less than 13, this function simulates pressing the left and right hand buttons for 3 frames each. ### Method POST ### Endpoint /character/duck_whiff_punish ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the punishment timing ### Request Example { "self": {}, "enemy": {}, "frames": 10 } ### Response #### Success Response (200) - **status** (string) - Execution status of the punishment logic #### Response Example { "status": "punishment_executed", "actions": ["L_HAND_pressed", "R_HAND_pressed"] } ``` -------------------------------- ### Check if Attack is Low Source: https://doc.tekkenscript.com/sdk/class/utils Identifies if the provided attack object represents a low-hitting attack. This is fundamental for implementing blocking logic and understanding attack trajectories. ```lua local result = utils.IsAttackLow(self) ``` -------------------------------- ### Handle Attack Counter Trigger Source: https://doc.tekkenscript.com/sdk/table/function This function is designed to execute actions when an attack counter is triggered. It is currently not implemented and only prints the player's move ID. This can be extended to include specific counter-trigger behaviors. ```lua onAttackCounter = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### utils.IsBlocking Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the player is blocking. This function determines if a player is currently blocking. ```APIDOC ## GET /utils/IsBlocking ### Description Checks if the player is blocking. ### Method GET ### Endpoint /utils/IsBlocking ### Parameters #### Path Parameters - **self** (table) - Required - The player object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// player properties" : "// player values" } } ### Response #### Success Response (boolean) - **isBlocking** (boolean) - True if the player is blocking; otherwise, false. #### Response Example { "isBlocking": true } ``` -------------------------------- ### Check if Attack is Whiffing Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a player's attack is whiffing (i.e., hitting nothing). It takes the attack object and returns a boolean. This is useful for tracking missed attacks and their consequences. ```lua local result = utils.IsAttackWhiffing(self) ``` ```lua local isWhiffing = utils.IsAttackWhiffing(attack) print(isWhiffing) -- Output: true or false ``` -------------------------------- ### POST /character/air_counters Source: https://doc.tekkenscript.com/sdk/table/function Handles counter actions against airborne enemies. Currently not implemented but can be extended for specific air counter strategies. ```APIDOC ## POST /character/air_counters ### Description Handles counters against airborne enemies. This function is currently not implemented but can be extended to handle specific counter actions against enemies in the air. ### Method POST ### Endpoint /character/air_counters ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the counter timing ### Request Example { "self": {}, "enemy": {}, "frames": 15 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the counter logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### Check grounded hit status (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a player is both grounded and hit. Takes a player object as input. Returns a boolean indicating grounded hit status. ```Lua local result = utils.IsGettingGroundHit(self) ``` -------------------------------- ### POST /character/high_counters Source: https://doc.tekkenscript.com/sdk/table/function Handles counter actions against high attacks. Currently not implemented but can be extended for specific high attack counter strategies. ```APIDOC ## POST /character/high_counters ### Description Handles counters against high attacks. This function is currently not implemented but can be extended to handle specific counter actions against high attacks. ### Method POST ### Endpoint /character/high_counters ### Parameters #### Request Body - **self** (object) - Required - The player object calling the function - **enemy** (PlayerSnapshot) - Required - The enemy's snapshot information - **frames** (integer) - Required - The number of frames to use for determining the counter timing ### Request Example { "self": {}, "enemy": {}, "frames": 12 } ### Response #### Success Response (200) - **status** (string) - Implementation status of the counter logic #### Response Example { "status": "not_implemented" } ``` -------------------------------- ### utils.IsAirborne Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the attacker is airborne. This function is useful for determining if an attacker is in the air and can be used to trigger specific events or calculations. ```APIDOC ## GET /utils/IsAirborne ### Description Checks if the attacker is airborne. ### Method GET ### Endpoint /utils/IsAirborne ### Parameters #### Path Parameters - **attacker** (table) - Required - The attacker object. #### Query Parameters None #### Request Body None ### Request Example { "attacker": { "// attacker properties" : "// attacker values" } } ### Response #### Success Response (boolean) - **isAirborne** (boolean) - True if the attacker is airborne; otherwise, false. #### Response Example { "isAirborne": true } ``` -------------------------------- ### Check wall splat status (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a player is currently wall splatted. Takes a player object as input. Returns a boolean indicating wall splat status. ```Lua local result = utils.IsGettingWallSplatted(self) ``` -------------------------------- ### Handle High Attack Counters Source: https://doc.tekkenscript.com/sdk/table/function This function is designed to manage counter-attacks specifically against high attacks. It is currently not implemented and only logs the player's move ID. This function can be expanded to include specific counter moves. ```lua high_counters = function(self, enemy, frames) print("self move_id" .. self.move_id) end, ``` -------------------------------- ### Check if Player is Blocking Source: https://doc.tekkenscript.com/sdk/class/utils Assesses whether the given player object is actively blocking. This is a fundamental check for defensive logic and determining if an attack will be blocked. ```lua local result = utils.IsBlocking(self) ``` -------------------------------- ### Punish Duck Whiff Attack Source: https://doc.tekkenscript.com/sdk/table/function Handles the punishment logic when an enemy misses an attack while the player is ducking. If the 'frames' parameter is below 13, it simulates pressing left and right hand buttons for 3 frames each. Otherwise, it executes a kick and hand combination for 1 frame. ```lua duck_whiff_punish = function(self, enemy, frames) print("duck_whiff_punish:" .. frames) --Ignore the next attack Combo1 Start if frames < 13 then executeMacro(0, Input.L_HAND, 3, InputType.KEY_PRESS) executeMacro(0, Input.R_HAND, 3, InputType.KEY_PRESS) return elseif frames < 25 then executeMacro(0, Input.L_KICK + Input.R_HAND, 1, InputType.KEY_PRESS) return end end, ``` -------------------------------- ### Check counter hit status (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Determines if a player is receiving a counter hit. Takes a player object as input. Returns a boolean indicating counter hit status. ```Lua local result = utils.IsGettingCounterHit(self) ``` -------------------------------- ### Check if Player is on Ground Source: https://doc.tekkenscript.com/sdk/class/utils Determines if the provided player object is currently in a grounded state. This is a common check for many game mechanics that differ based on whether a player is standing or airborne. ```lua local result = utils.IsOnGround(self) ``` -------------------------------- ### Check special player status (Lua) Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if a player is in a special status like knockdown or juggle. Takes a player object as input. Returns a boolean indicating special status. ```Lua local result = utils.IsSpecialStatus(self) ``` -------------------------------- ### GetGameSnapshot Function - Tekken Script Source: https://doc.tekkenscript.com/sdk/table/GetGameSnapshot Retrieves the current game state snapshot providing information on player and enemy states. This function is crucial for decision making within Tekken scripts. ```Tekken Script local gameSnapshot = GetGameSnapshot() -- Access player and enemy states local playerState = gameSnapshot.self local enemyState = gameSnapshot.enemy -- Access frame count and facing direction local currentFrameCount = gameSnapshot.frame_count local facingDirection = gameSnapshot.facing_bool -- Example of using player state information print("Player Move ID: " .. playerState.move_id) print("Enemy Distance: " .. enemyState.distance) ``` -------------------------------- ### Check if Player is While Standing Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if the player character is currently in a 'while standing' state. This function takes the player object and returns a boolean. It's useful for specific move properties or character states that only occur in this stance. ```lua local result = utils.IsWhileStanding(self) ``` ```lua local isWhileStanding = utils.IsWhileStanding(player) print(isWhileStanding) -- Output: true or false ``` -------------------------------- ### Check if Move Has Changed Source: https://doc.tekkenscript.com/sdk/class/utils Checks if a move object has undergone a change. It accepts the move object and returns a boolean. This can be used to track move updates or state transitions within the game logic. ```lua local result = utils.IsMoveChanged(self) ``` ```lua local moveChanged = utils.IsMoveChanged(move) print(moveChanged) -- Output: true or false ``` -------------------------------- ### Check if Attack is High Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if the provided attack object targets a high position. This is critical for implementing high-blocking mechanics and understanding the opponent's offensive options. ```lua local result = utils.IsAttackHigh(self) ``` -------------------------------- ### utils.IsPowerCrush Source: https://doc.tekkenscript.com/sdk/class/utils Checks if the move is a Power Crush. This function determines if a move is classified as a Power Crush, which impacts certain gameplay mechanics. ```APIDOC ## GET /utils/IsPowerCrush ### Description Checks if the move is a Power Crush. ### Method GET ### Endpoint /utils/IsPowerCrush ### Parameters #### Path Parameters - **self** (table) - Required - The move object. #### Query Parameters None #### Request Body None ### Request Example { "self": { "// move properties" : "// move values" } } ### Response #### Success Response (boolean) - **isPowerCrush** (boolean) - True if the move is a Power Crush; otherwise, false. #### Response Example { "isPowerCrush": true } ``` -------------------------------- ### Check if Move is Whiffing Source: https://doc.tekkenscript.com/sdk/class/utils Checks if a move is currently whiffing. It accepts the move object and returns a boolean. Similar to `IsAttackWhiffing`, but specifically for move states. ```lua local result = utils.is_Whiffing(self) ``` ```lua local isWhiffing = utils.is_Whiffing(move) print(isWhiffing) -- Output: true or false ``` -------------------------------- ### Check if Attack is a Throw Source: https://doc.tekkenscript.com/sdk/class/utils Identifies if the given attack object is a throw. Throws have unique properties and interactions, making this check important for specific game mechanics. ```lua local result = utils.IsAttackThrow(self) ``` -------------------------------- ### Check if Attack is Mid Source: https://doc.tekkenscript.com/sdk/class/utils Determines if the given attack object is a mid-hitting attack. This function is essential for distinguishing between different attack heights for defensive purposes. ```lua local result = utils.IsAttackMid(self) ``` -------------------------------- ### Check if Attacker is Airborne Source: https://doc.tekkenscript.com/sdk/class/utils Verifies if the provided attacker object represents a character currently in an airborne state. This function is useful for situational logic that depends on the opponent's vertical position. ```lua local result = utils.IsAirborne(attacker) ``` -------------------------------- ### Check if Move is a Power Crush Source: https://doc.tekkenscript.com/sdk/class/utils Determines if the given move object is a Power Crush attack. Power Crush moves are unique in that they can absorb hits while active. This check helps in identifying such moves. ```lua local result = utils.IsPowerCrush(self) ``` -------------------------------- ### Check Key Press with is_key_down (TekkenScript) Source: https://doc.tekkenscript.com/sdk/table/is_key_down Checks if a specific key or button is currently pressed down using the is_key_down function. This function takes an integer representing the key or button, typically from the Keys table. It returns a boolean value indicating the press state. Useful for real-time input detection. ```TekkenScript -- Check if the 'A' key is pressed down if is_key_down(Keys.A) then print("The 'A' key is currently pressed.") else print("The 'A' key is not pressed.") end -- Check if the 'W' key is pressed down if is_key_down(Keys.W) then print("The 'W' key is currently pressed.") else print("The 'W' key is not pressed.") end ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.