Pixel Game Maker MV

Pixel Game Maker MV

47 个评价
Scripting Made Easy
由 Baz 制作
Scripting in Pixel Game Maker MV can be quite useful, but it's not that easy or very comfortable to get into at first. Hopefully, this guide can change this by helping with some weaknesses of it, which are:
  1. No IntelliSense
  2. No easy or expandable templates
  3. No argument values for Runtime Actions and Link Conditions
The goal of this guide is to make scripting more accessible via templates along with value information for runtime action and link condition arguments.

I will continue to update this guide and add new functions to what I call the 'Power Template' (found in the Script Templates section). I have already used this guide a ton in my own projects and will make videos that support and add to this guide in the future. Hope this helps you advance in PGMMV!

Special Thanks:
  • Standard Enemy
  • Joe
  • Abstract
  • Justus
These developers paved the way for PGMMV to reach this next level of Scripting Made Easy! Enjoy!

baz
2
   
奖励
收藏
已收藏
取消收藏
----- Basics -----
API Documentation[tkool.jp]

Overview of guide and How To Use:

Script Templates
NOTE: IIFE's are not required on every runtime action script, but they are on some, so it is generally best practice to use IIFE for everything you are scripting.

Non-looping template:
(function(){ })()

Looping runtime action template:
return (function(){ return Agtk.constants.actionCommands.commandBehavior.CommandBehaviorLoop; })()

Looping link condition:
(function(){ var condition = //put condition here return condition; })()

Looping link condition as an if incase you want to run other code prior to leaving link (all my link condition templates are setup this way):
(function(){ var condition = //put condition here if(condition){ //run other code here return true; } return false; })()

POWER TEMPLATE with commonly used functions:
(function(){ // SCRIPT START // SCRIPT END // USEFUL FUNCTIONS function Log(event){ return Agtk.log(event); } function ConvertSecondsTo300(seconds){ return seconds * 300; } function Clamp(value, min, max){ return Math.min(Math.max(value, min), max); } function Lerp(start, end, time){ var _dist = (1 - time) * start + time * end; return Math.round(_dist * 10) / 10; } function GetAngleAway(startX, startY, endX, endY){ var _pi = Math.PI; var _x = startX - endX; var _y = endY - startY; var _angle = Math.atan2(_x, _y) * (180 / _pi); return (_angle < 0) ? (360 + _angle) : _angle; } function GetAngleToward(startX, startY, endX, endY){ var _pi = Math.PI; var _x = endX - startX; var _y = startY - endY; var _angle = Math.atan2(_x, _y) * (180 / _pi); return (_angle < 0) ? (360 + _angle) : _angle; } // INPUT RELATED FUNCTIONS function IsKeyPressed(keyId){ for(var i = 0; i <= Agtk.controllers.MaxControllerId; i++){ if(Agtk.controllers.getOperationKeyPressed(i, keyId)){ return true; } } } // INSTANCE RELATED FUNCTIONS function GetSelf(){ return Agtk.objectInstances.get(instanceId); } function GetOtherInstance(nameOrId){ if(isNaN(nameOrId)){ return Agtk.objectInstances.get(Agtk.objectInstances.getIdByName(-1, nameOrId)); } return Agtk.objectInstances.get(nameOrId); } function GetParentInstance(childNameOrId){ var _child; if(isNaN(childNameOrId)){ _child = Agtk.objectInstances.get(Agtk.objectInstances.getIdByName(-1, childNameOrId)); }else{ _child = Agtk.objectInstances.get(childNameOrId); } var _parentId = _child.variables.get(_child.variables.ParentObjectInstanceIDId).getValue(); return Agtk.objectInstances.get(_parentId); } function GetAttackerInstance(instance){ var _attackerList = instance.getAttackerInstanceIdList(); for(var attacker in _attackerList){ return Agtk.objectInstances.get(_attackerList[attacker]); } } // INSTANCE SWITCH/VARIABLE RELATED FUNCTIONS function GetInstanceSwitch(instance, nameOrId){ if(isNaN(nameOrId)){ return instance.switches.get(instance.switches.getIdByName(nameOrId)).getValue(); } return instance.switches.get(nameOrId).getValue(); } function SetInstanceSwitch(instance, nameOrId, value){ if(isNaN(nameOrId)){ instance.switches.get(instance.switches.getIdByName(nameOrId)).setValue(value); return; } instance.switches.get(nameOrId).setValue(value); } function GetInstanceVariable(instance, nameOrId){ if(isNaN(nameOrId)){ return instance.variables.get(instance.variables.getIdByName(nameOrId)).getValue(); } return instance.variables.get(nameOrId).getValue(); } function SetInstanceVariable(instance, nameOrId, value){ if(isNaN(nameOrId)){ instance.variables.get(instance.variables.getIdByName(nameOrId)).setValue(value); return; } instance.variables.get(nameOrId).setValue(value); } // COMMON SWITCH/VARIABLE RELATED FUNCTIONS function GetCommonSwitch(nameOrId){ if(isNaN(nameOrId)){ return Agtk.switches.get(Agtk.switches.getIdByName(nameOrId)).getValue(); } return Agtk.switches.get(nameOrId).getValue(); } function SetCommonSwitch(nameOrId, value){ if(isNaN(nameOrId)){ Agtk.switches.get(Agtk.switches.getIdByName(nameOrId)).setValue(value); return; } Agtk.switches.get(nameOrId).setValue(value); } function GetCommonVariable(nameOrId){ if(isNaN(nameOrId)){ return Agtk.variables.get(Agtk.variables.getIdByName(nameOrId)).getValue(); } return Agtk.variables.get(nameOrId).getValue(); } function SetCommonVariable(nameOrId, value){ if(isNaN(nameOrId)){ Agtk.variables.get(Agtk.variables.getIdByName(nameOrId)).setValue(value); return; } Agtk.variables.get(nameOrId).setValue(value); } })()
Debug Log
Agtk.log is the debugger for PGMMV. You can use it to see in the F1 Runtime Log Console various things. Here are a few examples:

Built-in variables (instanceId):
(function(){ Agtk.log(instanceId); })()

String:
(function(){ Agtk.log("Hello PGMMV"); })()

Local script variables:
(function(){ var instance = Agtk.objectInstances.get(instanceId); var xCoordinate = instance.variables.get(instance.variables.XId).getValue(); Agtk.log(xCoordinate); })()

Combo strings with a value:
(function(){ var instance = Agtk.objectInstances.get(instanceId); var xCoordinate = instance.variables.get(instance.variables.XId).getValue(); Agtk.log("Players X Position: " + xCoordinate); })()
Editor Show Log
Show Log is one of the most important information finders when making a script.

To open the Show Log:
  1. Go to the 'Plug-ins' tab
  2. If list is empty right-click and add plug-in (doesn't have to be an actual plug-in)
  3. Click on 'Show Log' button near the bottom of window


This will cause a new window to pop up and it should be prepopulated with information right away. The log updates the most recent change at the very bottom (don't ask me why):



To help make things quicker to find, we can clear out the log to make sure our next action in the editor appears first. In this example we will get the arguments required for the Set Move Direction and Move runtime action:
  1. Select and click OK on the runtime action you desire to get arguments for
  2. Go to the Show Log and click 'Clear' on the bottom right corner
  3. Now click back into the runtime action


Notice in the log you got the arguments required for the runtime action showing on the first part of the screen! This also helps us understand better what the API is asking for:



Let's recap this into 3 simple steps:
  1. Select the desired outcome and exit out
  2. Clear the log
  3. Reselect the desired outcome

And that is it! You can now successfully use Show Log to find information on just about anything!
Finding ID's
Standard Enemy's complete list of Switch and Variable names and Id's:
Switch ID:


Variable ID:


Action Box ID: The way you know it's an action is the 0 before the action ID


Condition Link ID: The way you know it's a link is the 1 before the condition link ID


Connection Point ID:


Image ID:


Video ID:


Text ID:


Font ID:


Control Key ID: Default keys are 1-20, 26, 27 while newly created keys will be 1000+
Using Arguments
In the runtime action and link condition templates I provide all available arguments you may need, however you don't need all the arguments sometimes. For example 'Move Object' to simply move the Player Group upward (0 degrees) for 128 pixels at 100% move speed the only arguments I would need are these:

(function(){ var args = { "moveType": 0, "angle": 0, "moveDistance": 128, "useObjectParameter": true, "changeMoveSpeed": 100, "targettingType": 0, "targetObjectType": 1, "targetObjectGroup": 0, } Agtk.objectInstances.get(instanceId).execCommandObjectMove(args); })()

The above example you can even get away with less than that (try blanking out the args and running it), but I would recommend keeping the arguments you are using at least in the script.

Additionally you can run multiple runtime actions or link conditions in one script. In order to do so you just need to make sure the 'args' have different variable names. For example 'args1' and 'args2' or you can get more specific and name them something like 'hpZeroArgs' and 'offCameraArgs', both shown below.

Multiple runtime action args:
(function(){ var args1 = { "direction": 270, "directionId": -2, "moveDistance": 0, "moveDistanceEnabled": false } var args2 = { "layerIndex": 0 } Agtk.objectInstances.get(instanceId).execCommandDirectionMove(args1); Agtk.objectInstances.get(instanceId).execCommandLayerMove(args2); })()

Multiple link condition args:
(function(){ var hpZeroArgs = { "objectId": -2 } var offCameraArgs = { "objectId": -2, "distanceFlag": false, "distance": 0 } var hpZero = Agtk.objectInstances.get(instanceId).isHpZero(hpZeroArgs); var offCamera = Agtk.objectInstances.get(instanceId).isCameraOutOfRange(offCameraArgs); if(hpZero && offCamera){ return true; } return false; })()
Targeting Input Control Keys
The best way to determine if input is pressed is inside a link condition. Note this is only the constant Pressing and Releasing of a key. On Press and On Release will hopefully come later, but currently are only available in editor.

Control Key 'A' is Pressed (non function):
(function(){ var controlKey = 1; for(var i = 0; i <= Agtk.controllers.MaxControllerId; i++){ if(Agtk.controllers.getOperationKeyPressed(i, controlKey)){ return true; } } return false; })()

Control Key 'OK' is Pressed (with function):
(function(){ return IsKeyPressed(26); function IsKeyPressed(keyId){ for(var i = 0; i <= Agtk.controllers.MaxControllerId; i++){ if(Agtk.controllers.getOperationKeyPressed(i, keyId)){ return true; } } } })()

Multiple Control Key example for if 'A' or 'OK' is pressed AND 'X' is released (with function):
(function(){ var aPressed = IsKeyPressed(1); //pressed var okPressed = IsKeyPressed(26); //pressed var xReleased = !IsKeyPressed(3); //not pressed if((aPressed || okPressed) && xReleased){ return true; } return false; function IsKeyPressed(keyId){ for(var i = 0; i <= Agtk.controllers.MaxControllerId; i++){ if(Agtk.controllers.getOperationKeyPressed(i, keyId)){ return true; } } } })()
Targeting Switches & Variables
No need for me to go into depth about getting and setting switches and variables via scripting. Joe, Standard Enemy, and Abstract have all given the community plenty of guidance in that department.

Abstract's scripting guide to understanding the basics:
Standard Enemy's complete list of Switch and Variable names and Id's:

Functions to GET and SET values from instance switch/variables:
// GET function GetInstanceSwitch(instance, nameOrId){ if(isNaN(nameOrId)){ return instance.switches.get(instance.switches.getIdByName(nameOrId)).getValue(); } return instance.switches.get(nameOrId).getValue(); } function GetInstanceVariable(instance, nameOrId){ if(isNaN(nameOrId)){ return instance.variables.get(instance.variables.getIdByName(name)).getValue(); } return instance.variables.get(nameOrId).getValue(); } // SET function SetInstanceSwitch(instance, nameOrId, value){ if(isNaN(nameOrId)){ instance.switches.get(instance.switches.getIdByName(nameOrId)).setValue(value); return; } instance.switches.get(nameOrId).setValue(value); } function SetInstanceVariable(instance, nameOrId, value){ if(isNaN(nameOrId)){ instance.variables.get(instance.variables.getIdByName(nameOrId)).setValue(value); return; } instance.variables.get(nameOrId).setValue(value); }

Functions to GET and SET values from common switch/variables:
// GET function GetCommonSwitch(nameOrId){ if(isNaN(nameOrId)){ return Agtk.switches.get(Agtk.switches.getIdByName(nameOrId)).getValue(); } return Agtk.switches.get(nameOrId).getValue(); } function GetCommonVariable(nameOrId){ if(isNaN(nameOrId)){ return Agtk.variables.get(Agtk.variables.getIdByName(nameOrId)).getValue(); } return Agtk.variables.get(nameOrId).getValue(); } // SET function SetCommonSwitch(nameOrId, value){ if(isNaN(nameOrId)){ Agtk.switches.get(Agtk.switches.getIdByName(nameOrId)).setValue(value); return; } Agtk.switches.get(nameOrId).setValue(value); } function SetCommonVariable(nameOrId, value){ if(isNaN(nameOrId)){ Agtk.variables.get(Agtk.variables.getIdByName(nameOrId)).setValue(value); return; } Agtk.variables.get(nameOrId).setValue(value); }

Example getting and setting an instances variable, in the functions you can use the name or number ID as the argument. Having the functions in this example is a bit overkill, but you can see how nice they can be to have available:
(function(){ var self = GetSelf(); var maxhp = GetInstanceVariable(self, 3); SetInstanceVariable(self, "HP", maxhp); function GetSelf(){ return Agtk.objectInstances.get(instanceId); } function GetInstanceVariable(instance, nameOrId){ if(isNaN(nameOrId)){ return instance.variables.get(instance.variables.getIdByName(name)).getValue(); } return instance.variables.get(nameOrId).getValue(); } function SetInstanceVariable(instance, nameOrId, value){ if(isNaN(nameOrId)){ instance.variables.get(instance.variables.getIdByName(nameOrId)).setValue(value); return; } instance.variables.get(nameOrId).setValue(value); } })()
Targeting Other Instances
Target other instance by name (no function):
(function(){ var otherInstance = Agtk.objectInstances.get(Agtk.objectInstances.getIdByName(-1, "NAME")); })()

Target multiple instances by names or ID's (with function):
(function(){ var player = GetOtherInstance("player"); var enemy1 = GetOtherInstance(3); var enemy2 = GetOtherInstance("enemy2"); function GetOtherInstance(nameOrId){ if(isNaN(nameOrId)){ return Agtk.objectInstances.get(Agtk.objectInstances.getIdByName(-1, nameOrId)); } return Agtk.objectInstances.get(nameOrId); } })()

To be clear when I used 'NAME' or the 'player' and 'enemy2' instance names, it's referring to the instance name that is given to Scene tab -> Objects:

Targeting Parent Instance
Target self parent for runtime action (no function):
(function(){ var instance = Agtk.objectInstances.get(instanceId); var parentId = instance.variables.get(instance.variables.ParentObjectInstanceIDId).getValue(); var parent = Agtk.objectInstances.get(parentId); var args = { "direction": 270, "directionId": -2, "moveDistance": 0, "moveDistanceEnabled": false } parent.execCommandDirectionMove(args); })()

Target self parent for runtime action (with function):
(function(){ var args = { "direction": 270, "directionId": -2, "moveDistance": 0, "moveDistanceEnabled": false } GetParentInstance("player").execCommandDirectionMove(args); function GetParentInstance(childNameOrId){ var _child; if(isNaN(childNameOrId)){ _child = Agtk.objectInstances.get(Agtk.objectInstances.getIdByName(-1, childNameOrId)); }else{ _child = Agtk.objectInstances.get(childNameOrId); } var _parentId = _child.variables.get(_child.variables.ParentObjectInstanceIDId).getValue(); return Agtk.objectInstances.get(_parentId); } })()

Target self parent for link condition (no function):
(function(){ var instance = Agtk.objectInstances.get(instanceId); var parentId = instance.variables.get(instance.variables.ParentObjectInstanceIDId).getValue(); var parent = Agtk.objectInstances.get(parentId); var args = { "objectId": -2 } var condition = parent.isHpZero(args); if(condition){ return true; } return false; })()
Targeting Attacker Instance
The easiest way to use attacker instance API is to setup the script in a link condition.

Target attacker instance (as link condition):
(function(){ var _attackerList = Agtk.objectInstances.get(instanceId).getAttackerInstanceIdList(); for(var attacker in _attackerList){ var _attacker = Agtk.objectInstances.get(_attackerList[attacker]); if(_attacker != undefined){ // THINGS YOU WANT TO DO WITH ATTACKER HERE return true; } } return false; })()

Example of grabbing attacker 'Instance ID' and storing it in the hit objects variable 'attacker_id':
(function(){ var _attackerList = Agtk.objectInstances.get(instanceId).getAttackerInstanceIdList(); for(var attacker in _attackerList){ var _attacker = Agtk.objectInstances.get(_attackerList[attacker]); if(_attacker != undefined){ var _self = Agtk.objectInstances.get(instanceId); var _attackerId = _attacker.variables.get(_attacker.variables.InstanceIDId).getValue(); _self.variables.get(_self.variables.getIdByName("attacker_id")).setValue(_attackerId); return true; } } return false; })()
----- Runtime Action Templates -----
How this section will read:
  1. Copy paste script template with the default settings
  2. Explanation of the args and values
  3. Reference to the API
Set Move Direction and Move
Object Self:
(function(){ var args = { "direction": 270, "directionId": -2, "moveDistance": 0, "moveDistanceEnabled": false } Agtk.objectInstances.get(instanceId).execCommandDirectionMove(args); })()
  • direction: Value 0 - 359. Common use references, but not limited too:
    • 0 = Up
    • 90 = Right
    • 180 = Down
    • 270 = Left

  • directionId: Value -1 or 1+. WARNING: If the value is 0 or a number outside the number of directions you have in your motion, the game will crash. This is of particular interest if you are using this to move another object
    • -2 = Match Movement Direction
    • 1+ = Any directions that particular motion has available

  • moveDistance: Value any whole number. Distance to move (in pixels) and only works if moveDistanceEnabled is true. NOTE: If you put decimals, the value will round down to the nearest whole number.

  • moveDistanceEnabled: Value true/false
    • True = Specify Movement Distance
    • False = Infinite Movement
Move Towards Display Direction
Object Self:
(function(){ var args = { "distanceOverride": false, "moveDistance": 0, "reverse": false } Agtk.objectInstances.get(instanceId).execCommandDisplayDirectionMove(args); })()
  • distanceOverride: Value true/false
    • True = Specify Movement Distance
    • False = Infinite Movement

  • moveDistance: Value any whole number. Distance to move (in pixels) and only works if distanceOverride is true. NOTE: If you put decimals, the value will round down to the nearest whole number.

  • reverse: Value true/false
    • True = Move in Reverse Direction
    • False = Move in Display Direction
Back and Forth Moving and Turning
Object Self:
(function(){ var args = { "moveType": 0, "turnType": 0, "directionId": -2 } Agtk.objectInstances.get(instanceId).execCommandForthBackMoveTurn(args); })()
  • moveType: Value 0-2. NOTE: Any values outside 0-2 won't crash game but will null the action.
    • 0 = None
    • 1 = Move Forward
    • 2 = Move Backward

  • turnType: Value 0-2. NOTE: Any values outside 0-2 won't crash game but will null the action.
    • 0 = None
    • 1 = Turn Right
    • 2 = Turn Left

  • directionId: This is the direction the object will face while moving. Anything < 0 (ie -1, -2, etc) will result in 'Match Movement Direction'. Anything above 0 (ie 1, 2, etc) will represent the directions that particular motion has available. NOTE: If value for direction doesn't exist in the motion, the game won't crash, but the animation will be null.
Template Move Settings
Object Self:
(function(){ var args = { "moveType": 2, "horizontalMoveStartRight": false, "horizontalMoveDuration300": 300, "horizontalInfinite": false, "verticalMoveStartDown": false, "verticalMoveDuration300": 300, "verticalInfinite": false, "randomMoveDuration300": 300, "randomMoveStop300": 300, "nearObjectGroup":0, "nearObjectLockedObjectPrior":false, "nearPlayerLockedPlayerPrior": false, "apartNearObjectGroup":0, "apartNearObjectLockedObjectPrior": false, "apartNearPlayerLockedPlayerPrior": false, "fallFromStep": true, "ignoreOtherObjectWallArea": false, "ignoreWall": false } Agtk.objectInstances.get(instanceId).execCommandTemplateMove(args); })()
  • moveType: Value 0-6. NOTE: Values outside 0-6 won't crash game, but will null the action.
    • 0 = Move Left/Right
    • 1 = Move Up/Down
    • 2 = Bound
    • 3 = Random
    • 4 = Move Towards Nearby Object
    • 5 = Move Away from Nearby Object
    • 6 = Stop

  • horizontalMoveStartRight: Value True/False.
    • True = Start Move Right
    • False = Start Move Left

  • horizontalMoveDuration300: Value 0+. This is the time duration for pathing. A value of 300 = 1 second.

  • horizontalInfinite: Value True/False.
    • True = Duration is infinite (meaning it will only flip direction when hitting a wall/tile)
    • False = Duration is based on horizontalMoveDuration300 value

  • verticalMoveStartDown: Value True/False.
    • True = Start Move Down
    • False = Start Move Up

  • verticalMoveDuration300: Value 0+. This is the time duration for pathing. A value of 300 = 1 second.

  • verticalInfinite: Value True/False.
    • True = Duration is infinite (meaning it will only flip direction when hitting a wall/tile)
    • False = Duration is based on verticalMoveDuration300 value

  • randomMoveDuration300: Value 0+. This is the time duration for the random movement. A value of 300 = 1 second.

  • randomMoveStop300: Value 0+. This is the wait for when the next random movement will begin (object is stopped during wait). A value of 300 = 1 second.

  • nearObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • nearObjectLockedObjectPrior: Value True/False. NOTE: Seems to be tied with nearPlayerLockedPlayerPrior as well, make sure they both are same value.
    • True = Prioritize Locked Object of Group
    • False = No priority

  • nearPlayerLockedPlayerPrior: Value True/False. NOTE: Seems to be tied with nearObjectLockedObjectPrior as well, make sure they both are same value.
    • True = Prioritize Locked Object of Group
    • False = No priority

  • apartNearObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • apartNearObjectLockedObjectPrior: Value True/False. NOTE: Seems to be tied with apartNearPlayerLockedPlayerPrior as well, make sure they both are same value.
    • True = Prioritize Locked Object of Group
    • False = No priority

  • apartNearPlayerLockedPlayerPrior: Value True/False. NOTE: Seems to be tied with apartNearObjectLockedObjectPrior as well, make sure they both are same value.
    • True = Prioritize Locked Object of Group
    • False = No priority

  • fallFromStep: Value True/False.
    • True = Will fall off ledges
    • False = Won't fall off ledges and will flip pathing

  • ignoreOtherObjectWallArea: Value True/False.
    • True = Will ignore object wall detections
    • False = Won't ignore object wall detections

  • ignoreWall: Value True/False.
    • True = Will ignore tile wall detections (recommended not affected by gravity by 100%)
    • False = Won't ignore tile wall detections
Lock Object
Object Self:
(function(){ var args = { "lockTouchedObject": false, "lockViewportLightObject": false, "lockViewportLightOfAcrossLayerObject": false, "lockObjectOnScreen": false, "lockObjectTouchedByThisObjectAttack": false, "objectTypeByType": 1, "objectGroup": 0, "objectType": 0, "objectId": -1, "useType": 2, "switchId": -1, "switchCondition": 0, "variableId": -1, "compareVariableOperator": 2, "compareValueType": 0, "compareValue": 0, "compareVariableObjectId": -1, "compareVariableQualifierId": -1, "compareVariableId": -1 } Agtk.objectInstances.get(instanceId).execCommandObjectLock(args); })()
  • lockTouchedObject: Value True/False.
    • True = Only lock if wall detections are in contact with the object
    • False = Can lock without wall detection contact

  • lockViewportLightObject: Value True/False.
    • True = Only lock if the object is inside the field of vision
    • False = Can lock without a field of vision

  • lockViewportLightOfAcrossLayerObject: Value True/False.
    • True = Field of vision can apply across all layers
    • False = Field of vision only applies if on this objects layer

  • lockObjectOnScreen: Value True/False.
    • True = Only lock if the object is inside the screen view
    • False = Can lock without screen view

  • lockObjectTouchedByThisObjectAttack: Value True/False.
    • True = Only lock if objects are touching this objects attack detection
    • False = Can lock without attack detection

  • objectTypeByType: Value any whole number. If objectType is not a value of 1, this option (Set by Object Group) will take priority.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectType: Value any whole number OR 1.
    • 1 = This option (Set by Object) is priority
    • Any other whole number = Option not selected

  • objectId: Value 1+. Only useable if objectType = 1. The desired object ID will be placed here, you can get object ID by right-clicking an object and clicking object settings. A non existing object ID will not crash game but will null action.

  • useType: Value 0-2. 'Set by Target Variable/Switch' option.
    • 0 = Set Switch as Condition
    • 1 = Set Variable as Condition
    • 2 = Not Set (default)

  • switchId: Only useable if useType = 0. **This one is difficult to use scripting as the visual script version seems to get ID by name, so you might want to get the switch by name in a temp variable (in the script) and then use that temp variable as the switchId.
    • -1 = None
    • 1-11 = Refer to the default object self switches (see section for Switch/Variable ID references)
    • 2000+ = Created object self switches, see above ** for further details

  • switchCondition: Value 0-3. Only useable if useType = 0.
    • 0 = On
    • 1 = Off
    • 2 = Off to On
    • 3 = On to Off

  • variableId: Only useable if useType = 1. **This one is difficult to use scripting as the visual script version seems to get ID by name, so you might want to get the variable by name in a temp variable (in the script) and then use that temp variable as the variableId.
    • -1 = None
    • 1-38 = Refer to the default object self variables(see section for Switch/Variable ID references)
    • 2000+ = Created object self variables, see above ** for further details

  • compareVariableOperator: Value 0-5. Only useable if useType = 1.
    • 0 = Less than <
    • 1 = Less than or equal to <=
    • 2 = Equal to =
    • 3 = Greater than or equal to >=
    • 4 = Greater than >
    • 5 = Not equal to !=

  • compareValueType: Value 0-2. Only useable if useType = 1.
    • 0 = Constant
    • 1 = Other Variables
    • 2 = Non-numeric

  • compareValue: Value any float. Only useable if compareValueType = 0.

  • compareVariableObjectId: Value -2+. Only useable if compareValueType = 1.
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Name Common
    • 1+ = Object ID

  • compareVariableQualifierId: Value -2 or -1. Only useable if compareValueType = 1.
    • -2 = All
    • -1 = Single

  • compareVariableId: Only useable if compareValueType = 1. **This one is difficult to use scripting as the visual script version seems to get ID by name, so you might want to get the variable by name in a temp variable (in the script) and then use that temp variable as the variableId.
    • -1 = None
    • 6-23 = Refer to default common variables if compareVariableObjectId = 0 (see section for Switch/Variable ID references)
    • 1-38 = Refer to the default object self variables if compareVariableObjectId = -2 or 1+ (see section for Switch/Variable ID references)
    • 2000+ = Created object self variables, see above ** for further details
Release Lock
Object Self:
(function(){ var args = { "objectGroup": 0, "objectType": 0, "objectId": -1 } Agtk.objectInstances.get(instanceId).execCommandObjectUnlock(args); })()
  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectType: Value any whole number OR 1.
    • 1 = This option (Set by Object) is priority
    • Any other whole number = Option not selected

  • objectId: Value -1 and 1+. Only useable if objectType = 1.
    • -1 = Not Set
    • 1+ = The desired object ID will be placed here, you can get object ID by right-clicking an object and clicking object settings. A non existing object ID will not crash game but will null action
Generate Object
Object Self:
(function(){ var args = { "objectId": -1, "actionId": -1, "createPosition": 0, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "probability": 100, "childObject": false, "useRotation": false, "lowerPriority": false, "gridMagnet": false } Agtk.objectInstances.get(instanceId).execCommandObjectCreate(args); })()
  • objectId: Value -1 or 1+. WARNING: Game will crash if value is 0 or a nonexistent object ID positive number.
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • actionId: Value -1 or 1+. Note: If actionId doesn't exist, default action will apply
    • -1 = Default Action
    • 1+ = Any actions you may have

  • createPosition: Value 0 or 1. Note: If outside that value, action will be null
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object

  • useConnect: Value true/false.
    • True = Use Connection Point
    • False = Don't use Connection Point

  • connectId: Value -1 or 1+. Note: If outside an existing value, action will be null
    • -1 = Not Set
    • 1+ = Any connection points you may have

  • adjustX: Value any integer.

  • adjustY: Value any integer.

  • probability: Value any float 0.00 - 100.00.

  • childObject: Value true/false.
    • True = Generate as child
    • False = Don't generate as child

  • useRotation: Value true/false.
    • True = Match generated objects direction to this object
    • False = Don't match direction

  • lowerPriority: Value true/false.
    • True = Make generated object display below this object
    • False = Make generated object display above this object

  • gridMagnet: Value true/false.
    • True = Snap generated object to grid
    • False = Don't snap to grid
Change Object
Object Self:
(function(){ var args = { "objectId": -1, "actionId": -1, "createPosition": 0, "takeOverVariables": true, "takeOverSwitches": true, "takeOverParentChild": true, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "probability": 100 } Agtk.objectInstances.get(instanceId).execCommandObjectChange(args); })()
  • objectId: Value -1 or 1+. WARNING: Game will crash if value is 0 or a nonexistent object ID positive number.
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • actionId: Value -1 or 1+. Note: If actionId doesn't exist, default action will apply
    • -1 = Default Action
    • 1+ = Any actions you may have

  • createPosition: Value 0 or 1. Note: If outside that value, action will be null
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object

  • takeOverVariables: Value true/false.
    • True = Takes over the variables of this object
    • False = Don't take over variables

  • takeOverSwitches: Value true/false.
    • True = Inherit object switch values
    • False = Don't inherit

  • takeOverParentChild: Value true/false.
    • True = Maintain object's parent-child relationship
    • False = Don't maintain relationship

  • useConnect: Value true/false.
    • True = Use Connection Point
    • False = Don't use Connection Point

  • connectId: Value -1 or 1+. Note: If outside an existing value, action will be null
    • -1 = Not Set
    • 1+ = Any connection points you may have

  • adjustX: Value any integer.

  • adjustY: Value any integer.

  • probability: Value any float 0.00 - 100.00.
Move Object
Object Self:
(function(){ var args = { "moveType": 0, "angle": 0, "moveDistance": 128, "posX": 0, "posY": 0, "moveInDisplayCoordinates": false, "followCameraMoving": false, "centerObjectId": -1, "centerQualifierId": -1, "centerAdjustX": 0, "centerAdjustY": 0, "connectId": -1, "useObjectParameter": true, "changeMoveSpeed": 100, "moveDuration300": 300, "targettingType": 0, "targetObjectType": 1, "targetObjectGroup": 0, "targetObjectId": -1, "targetQualifierId": -1, "playerObject": false, "enemyObject": false, "objectGroupBit": 0, "excludeObjectGroupBit": 3, "fitDispDirToMoveDir": false, "dispWhileMoving": true, "stopActionWhileMoving": false, "stopAnimWhileMoving": false, "finalGridMagnet": false } Agtk.objectInstances.get(instanceId).execCommandObjectMove(args); })()
  • moveType: Value 0 - 4
    • 0 = Set Direction and Move
    • 1 = Set Coordinates and Move
    • 2 = Move to Specified Object - Center
    • 3 = Move to Specified Object - Origin
    • 4 = Move to Specified Object - Connection Point

  • angle: Value 0 - 359. Common use references, but not limited too:
    • 0 = Up
    • 90 = Right
    • 180 = Down
    • 270 = Left

  • moveDistance: Value any integer. Note: If using negative number, the movement will be instant and in opposite direction.
    • 0+ = Move distance in pixels

  • posX: Value any integer. This moves to this X coordinate. Note: The top-left corner of every scene is (0,0).

  • posY: Value any integer. This moves to this X coordinate. Note: The top-left corner of every scene is (0,0).

  • moveInDisplayCoordinates: Value true/false. Note: The X, Y will be purely based on the camera view.
    • True = Coordinates are Display Area-based
    • False = Not display area-based

  • followCameraMoving: Value true/false.
    • True = Adjust for camera scrolling
    • False = Don't adjust

  • centerObjectId: Value -2, -1 or 1+. WARNING: Game will crash if value is 0 or a nonexistent object ID positive number
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • centerQualifierId: Value -1.
    • -1 = Single

  • centerAdjustX: Value any integer.

  • centerAdjustY: Value any integer.

  • connectId: Value -1 or 1+. Note: If outside an existing value, action will be null
    • -1 = Not Set
    • 1+ = Any connection points you may have

  • useObjectParameter: Value true/false.
    • True = Use Basic Move Parameter of Target Object (Move Speed %)
    • False = Set Duration Until Target Position (Seconds)

  • changeMoveSpeed: Value any integer. Represents the speed % to change object to during the move. Note: If using negative number, the movement will be go in the opposite direction specified.

  • moveDuration300: Value 0+. This is the time duration for pathing. A value of 300 = 1 second.

  • targettingType: Value 0-3.
    • 0 = Set by Object Group
    • 1 = Set by Object
    • 2 = Objects Touching This Object (STRONGLY recommend not using script for this option)
    • 3 = Objects Locked by This Object

  • targetObjectType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • targetObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • targetObjectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • targetQualifierId: Value -1.
    • -1 = Single

  • playerObject: Value true/false.
    • True = Player Group is excluded from list
    • False = Not excluded

  • enemyObject: Value true/false.
    • True = Enemy Group is excluded from list
    • False = Not excluded

  • objectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.

  • excludeObjectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.

  • fitDispDirToMoveDir: Value true/false.
    • True = Match Display Direction to Move Direction
    • False = Don't match display direction

  • dispWhileMoving: Value true/false. Note: Opposite of editor
    • True = Don't Hide
    • False = Hide Object During Move

  • stopActionWhileMoving: Value true/false.
    • True = Stop Object Actions During Move
    • False = Don't stop actions

  • stopAnimWhileMoving: Value true/false.
    • True = Stop Object Animations During Move
    • False = Don't stop animations

  • finalGridMagnet: Value true/false.
    • True = Attach Moved Object to Grid
    • False = Don't snap to grid
Push/Pull Object
Object Self:
(function(){ var args = { "effectRangeBaseConnect": false, "effectRangeBaseConnectId": -1, "directionType": 0, "angle": 0, "connectId": -1, "rectangle": true, "rectangleDistance": 64, "rectangleHeight": 64, "circleDistance": 64, "arcAngle": 360, "effectDirectionType": 0, "effectDirection": 0.000000, "effectValue": 100, "distanceEffect": false, "nearValue": 100, "farValue": 100, "oneTimeEffect": false, "targettingType": 0, "targetObjectType": 1, "targetObjectGroup": 0, "targetObjectId": -1, "targetQualifierId": -1, "playerObject": false, "enemyObject": false, "objectGroupBit": 508, "excludeObjectGroupBit": 3 } Agtk.objectInstances.get(instanceId).execCommandObjectPushPull(args); })()
  • effectRangeBaseConnect: Value true/false
    • True = Set Effect Range Base as Connection Point
    • False = Don't use connection point

  • effectRangeBaseConnectId: Value -1 or 1+
    • -1 = Not Set
    • 1+ = Any connection points you may have

  • directionType: Value 0-1
    • 0 = Range Direction: Set Angle
    • 1 = Range Direction: This Object's Display Direction

  • angle: Value 0 - 359. Common use references, but not limited too:
    • 0 = Up
    • 90 = Right
    • 180 = Down
    • 270 = Left

  • connectId: Value -1 or 1+. Effect Direction connection point
    • -1 = Not Set
    • 1+ = Any connection points you may have

  • rectangle: Value true/false
    • True = Rectangle
    • False = Circle

  • rectangleDistance: Value 0+

  • rectangleHeight: Value 0+

  • circleDistance: Value 0+

  • arcAngle: Value 0-360

  • effectDirectionType: Value 0-2
    • 0 = Effect Direction: Set Angle
    • 1 = Effect Direction: This Object's Display Direction
    • 2 = Effect Direction: This Object's Connection Point

  • effectDirection: Value 0 - 359. Common use references, but not limited too:
    • 0 = Up
    • 90 = Right
    • 180 = Down
    • 270 = Left

  • effectRangeBaseConnectId: Value integer. Effective Strength +/-

  • distanceEffect: Value true/false
    • True = Bigger of smaller effect based on distance from this object
    • False = Not based on distance

  • nearValue: Value any integer

  • farValue: Value any integer

  • oneTimeEffect: Value true/false
    • True = Apply Only Once to Target
    • False = Apply continuously

  • targettingType: Value 0-3.
    • 0 = Set by Object Group
    • 1 = Set by Object
    • 2 = Objects Touching This Object (STRONGLY recommend not using script for this option)
    • 3 = Objects Locked by This Object

  • targetObjectType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • targetObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • targetObjectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • targetQualifierId: Value -1 or -2.
    • -2 = All
    • -1 = Single

  • playerObject: Value true/false.
    • True = Player Group is excluded from list
    • False = Not excluded

  • enemyObject: Value true/false.
    • True = Enemy Group is excluded from list
    • False = Not excluded

  • objectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.

  • excludeObjectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.
Execute Object Action
Object Self:
(function(){ var args = { "objectId": -1, "qualifierId": -1, "actionId": -1 } Agtk.objectInstances.get(instanceId).execCommandActionExec(args); })()
  • objectId: Value -2, -1 or 1+. WARNING: Game will crash if value is 0 or a nonexistent object ID positive number
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • qualifierId: Value -2 or -1.
    • -2 = All
    • -1 = Single

  • actionId: Value -1 or 1+. Note: If actionId doesn't exist, default action will apply
    • -1 = Default Action
    • 1+ = Any actions you may have
Move Layer
Object Self:
(function(){ var args = { "layerIndex": -1 } Agtk.objectInstances.get(instanceId).execCommandLayerMove(args); })()
  • layerIndex: Value -1 or 0+. Note: If non-existing layer, game will not crash but action will be null
    • -1 = Not Set
    • 0+ = Any created layers you may have, first layer = 0
Attack Settings
Object Self:
(function(){ var args = { "attackChange": 100, "hitObjectFlag": false, "playerAttackArea": false, "enemyAttackArea": false, "objectGroupBit": 0, "hitTileFlag": false, "tileAttackArea": false, "tileGroupBit": 0, "attributeType": 0, "attributePresetId": 1, "attributeValue": 0 } Agtk.objectInstances.get(instanceId).execCommandAttackSetting(args); })()
  • attackChange: Value any integer

  • hitObjectFlag: Value true/false
    • True = Change Object Groups Settings for Attack Detection
    • False = Don't change

  • playerAttackArea: Value true/false
    • True = Player Group is selected on Object Group Settings
    • False = Not selected

  • enemyAttackArea: Value true/false
    • True = Enemy Group is selected on Object Group Settings
    • False = Not selected

  • objectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.

  • hitTileFlag: Value true/false
    • True = Tile Group Settings for Attack Detection
    • False = Don't change

  • tileAttackArea: Value true/false
    • True = Default Tile Group is selected
    • False = Not selected

  • tileGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in

  • attributeType: Value 0-2.
    • 0 = Don't Set
    • 1 = Preset Attributes
    • 2 = Assign Constant to Attribute Variable

  • attributePresetId: Value 1-8
    • 1 = Fire
    • 2 = Water
    • 3 = Earth
    • 4 = Wind
    • 5 = Lightning
    • 6 = Ice
    • 7 = Light
    • 8 = Dark

  • attributeValue: Value whole number
Fire Bullet
Object Self:
(function(){ var args = { "bulletId": -1, "connectId": -1 } Agtk.objectInstances.get(instanceId).execCommandBulletFire(args); })()
  • bulletId: Value -1 or 1+. WARNING: If non-existing bulletId, game will crash
    • -1 = Not Set
    • 1+ = Any created bullet settings you may have, first bullet = 1

  • connectId: Value -1 or 1+. Note: If outside an existing value, action will be null
    • -1 = Not Set
    • 1+ = Any connection points you may have
Destroy Object
Object Self:
(function(){ Agtk.objectInstances.get(instanceId).execCommandDisappear(); })()
Restore Destroyed Object
Object Self:
(function(){ var args = { "objectId": -1 } Agtk.objectInstances.get(instanceId).execCommandDisappearObjectRecover(args); })()
  • objectId: Value -1 or 1+
    • -1 = Not Set
    • 1+ = Any created objects you may have
Disable Object
Object Self:
(function(){ Agtk.objectInstances.get(instanceId).execCommandDisable(); })()
Enable Disabled Object
Object Self:
(function(){ var args = { "objectId": -1 } Agtk.objectInstances.get(instanceId).execCommandDisableObjectEnable(args); })()
  • objectId: Value -1 or 1+
    • -1 = Not Set
    • 1+ = Any created objects you may have
Change Switch/Variable
Checking for switch or variables values are much easier with basic scripting then by using this condition template so I recommend looking at section 'Targeting Switches & Variables' for easier switch/var conditions. NOTE: I do not include the assignScript, useCoffeeScript, or javaScript in this template as we are actively scripting if we are using this.

Object Self:
(function(){ var args = { "swtch": true, "switchObjectId": -1, "switchQualifierId": -1, "switchId": -1, "switchValue": 0, "variableObjectId": -1, "variableQualifierId": -1, "variableId": -1, "variableAssignOperator": 0, "variableAssignValueType": 0, "assignValue": 0.000000, "assignVariableObjectId": -1, "assignVariableQualifierId": -1, "assignVariableId": -1, "randomMin": 0, "randomMax": 100 } Agtk.objectInstances.get(instanceId).execCommandSwitchVariableChange(args); })()
  • swtch: Value true/false
    • True = Switch
    • False = Variable

  • switchObjectId: Value -7, -5, -2, -1, 0, 1+.
    • -7 = Parent
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • switchQualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • switchId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default switch, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting switch values

  • switchValue: Value 0 - 2
    • 0 = ON
    • 1 = OFF
    • 2 = Toggle

  • variableObjectId: Value -7, -5, -2, -1, 0, 1+.
    • -7 = Parent
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • variableQualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • variableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • variableAssignOperator: Value 0 - 5
    • 0 = Assign (=)
    • 1 = Add (+=)
    • 2 = Subtract (-=)
    • 3 = Multiply (*=)
    • 4 = Divide (/=)
    • 5 = Modulus (%=)

  • variableAssignValueType: Value 0 - 3
    • 0 = Constant
    • 1 = Variables
    • 2 = Random
    • 3 = Script

  • assignValue: Value any float

  • assignVariableObjectId: Value -7, -2, -1, 0, 1+
    • -7 = Parent
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • assignVariableQualifierId: Value -1
    • -1 = Single

  • assignVariableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • randomMin: Any integer

  • randomMax: Any integer
Reset Switch/Variable
This runtime action is challenging to script. I feel it's better ran inside the editor only. You have to create an array with information of the switch/variables to reset. Samples provided below:

Object Self:
(function(){ var args = {"32":"\t[ // ARGUMENTS START { \"swtch\": true, \"objectId\": 0, \"itemId\": 2001 }, // Common Switch Example { \"swtch\": true, \"objectId\": -2, \"itemId\": 2001 }, // Object Self Switch Example { \"swtch\": true, \"objectId\": 1, \"itemId\": 1 }, // Object ID Invincibilty Switch Example { \"swtch\": false, \"objectId\": 0, \"itemId\": 12 }, // Common Variable Example { \"swtch\": false, \"objectId\": 6, \"itemId\": 2 } // Object ID HP Variable Example // ARGUMENTS END ]"} Agtk.objectInstances.get(instanceId).execCommandSwitchVariableReset(args); })()
  • swtch: Value true/false.
    • True = Switch
    • False = Variable

  • objectId: Value -2, 0+
    • -2 = Object Self
    • 0 = Common Switch/Variable
    • 1+ = Any Object ID's you may have created

  • itemId: This takes an whole number 1+ and represents the Switch or Variable ID. Value will depend on if Self or Common selected as well as if a created or default so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting the corresponding ID

Apply Filter Effects on Object
Object Self:
(function(){ var args = { "effectType": 1, "noise": 100, "mosaic": 100, "monochrome": 100, "sepia": 100, "negaPosiReverse": 100, "defocus": 100, "chromaticAberration": 100, "darkness": 100, "transparency": 100, "blinkInterval300": 0, "imageId": -1, "imageTransparency": 0, "imagePlacement": 0, "fillA": 255, "fillR": 255, "fillG": 255, "fillB": 255, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandObjectFilterEffect(args); })()
  • effectType: Value 0 - 11
    • 0 = Noise
    • 1 = Mosaic
    • 2 = Monochrome
    • 3 = Sepia
    • 4 = Invert
    • 5 = Blur
    • 6 = Chromatic Aberration
    • 7 = Darken
    • 8 = Show Image
    • 9 = Apply Selected Color
    • 10 = Transparency
    • 11 = Blink

  • noise: Value 0 - 100

  • mosaic: Value 0 - 100

  • monochrome: Value 0 - 100

  • sepia: Value 0 - 100

  • negaPosiReverse: Value 0 - 100. Referring to Invert %

  • defocus: Value 0 - 100. Referring to Blur %

  • chromaticAberration: Value 0 - 100

  • darkness: Value 0 - 100. Referring to Darken %

  • transparency: Value 0 - 100

  • blinkInterval300: Value 0.00+. NOTE: 300 = 1sec

  • imageId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any image ID you have in Resources tab

  • imageTransparency: Value 0 - 100

  • imagePlacement: NA

  • fillA: Value 0 - 255

  • fillR: Value 0 - 255

  • fillG: Value 0 - 255

  • fillB: Value 0 - 255

  • duration300: Value 0.00+. NOTE: 300 = 1sec
Delete Filter Effects from Objects
Object Self:
(function(){ var args = { "removeBit": 0, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandObjectFilterEffectRemove(args); })()
  • removeBit: Values are in bit because of the various combos that can be selected. STRONGLY RECOMMENDED to setup in runtime action and copy the value from the Show Log if you need to use it in script. Here are two options for example:
    • 0 = None
    • 4095 = All Filter Effects

  • duration300: Value 0.00+. NOTE: 300 = 1sec

Apply Screen Effects to Scene
Note the args have another set of { } for the filterEffect portion of properties.

Object Self:
(function(){ var args = { "layerIndex": -1, "filterEffect": { "effectType": 0, "noise": 100, "mosaic": 100, "monochrome": 100, "sepia": 100, "negaPosiReverse": 100, "defocus": 100, "chromaticAberration": 100, "darkness": 100, "transparency": 100, "blinkInterval300": 0, "imageId": -1, "imageTransparency": 0, "imagePlacement": 0, "fillA": 255, "fillR": 255, "fillG": 255, "fillB": 255, "duration300": 300 }} Agtk.objectInstances.get(instanceId).execCommandSceneEffect(args); })()
  • layerIndex: Value -4, -3, -1, 0+
    • -4 = Foremost Layer + Menu
    • -3 = Foremost Layer
    • -1 = All Layers in Scene
    • 0+ = Any individual available layer

  • effectType: Value 0 - 11
    • 0 = Noise
    • 1 = Mosaic
    • 2 = Monochrome
    • 3 = Sepia
    • 4 = Invert
    • 5 = Blur
    • 6 = Chromatic Aberration
    • 7 = Darken
    • 8 = Show Image
    • 9 = Apply Selected Color
    • 10 = Transparency
    • 11 = Blink

  • noise: Value 0 - 100

  • mosaic: Value 0 - 100

  • monochrome: Value 0 - 100

  • sepia: Value 0 - 100

  • negaPosiReverse: Value 0 - 100. Referring to Invert %

  • defocus: Value 0 - 100. Referring to Blur %

  • chromaticAberration: Value 0 - 100

  • darkness: Value 0 - 100. Referring to Darken %

  • transparency: Value 0 - 100

  • blinkInterval300: Value 0.00+. NOTE: 300 = 1sec

  • imageId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any image ID you have in Resources tab

  • imageTransparency: Value 0 - 100

  • imagePlacement: Value 0 - 4
    • 0 = Center
    • 1 = Enlarge
    • 2 = Tiles
    • 3 = Keep Aspect Ratio and Enlarge
    • 4 = Center of This Object

  • fillA: Value 0 - 255

  • fillR: Value 0 - 255

  • fillG: Value 0 - 255

  • fillB: Value 0 - 255

  • duration300: Value 0.00+. NOTE: 300 = 1sec

Delete Screen Effects from Scene
Object Self:
(function(){ var args = { "layerIndex": -1, "removeBit": 0, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandSceneEffectRemove(args); })()
  • layerIndex: Value -4, -3, -1, 0+
    • -4 = Foremost Layer + Menu
    • -3 = Foremost Layer
    • -1 = All Layers in Scene
    • 0+ = Any individual available layer

  • removeBit: Values are in bit because of the various combos that can be selected. STRONGLY RECOMMENDED to setup in runtime action and copy the value from the Show Log if you need to use it in script. Here are two options for example:
    • 0 = None
    • 1023= All Filter Effects

  • duration300: Value 0.00+. NOTE: 300 = 1sec

Change Scene Gravity Effects
PLEASE READ:
For some reason Steam didn't want the execCommand to have Scene and Gravity together, it shows it as this: 'execCommandSceneGravityChange'. I added a * in between the words so please delete the * when you copy paste the template into a script.

Object Self:
(function(){ var args = { "gravity": 100, "direction": 180, "duration300": 300, "durationUnlimited": false } Agtk.objectInstances.get(instanceId).execCommandScene*GravityChange(args); })()
  • gravity: Value 0.00+. Percentage of gravity

  • direction: Value floats. Common use references, but not limited too:
    • 0 = Up
    • 90 = Right
    • 180 = Down
    • 270 = Left

  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Time limited to duration300 property
Rotate/Flip Scene
Object Self:
(function(){ var args = { "type": 1, "rotationFlag": false, "rotation": 0, "absoluteRotation": false, "flipX": false, "flipY": false, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandSceneRotateFlip(args); })()
  • type: Value 0 - 1
    • 0 = Reset
    • 1 = Rotate/Flip

  • rotationFlag: Value true/false
    • True = Rotate
    • False = Don't Rotate

  • rotation: Value 0.00+. Percentage of rotation

  • absoluteRotation: Value true/false
    • True = Absolute Angle
    • False = Not Absolute

  • flipX: Value true/false
    • True = Flip Horizontal
    • False = No Horizontal flip

  • flipY: Value true/false
    • True = Flip Vertical
    • False = No Vertical flip

  • duration300: Value 0.00+. NOTE: 300 = 1sec
Shake Scene
Object Self:
(function(){ var args = { "duration300": 300, "fadeIn": false, "fadeOut": false, "interval300": 30, "height": 16, "heightDispersion": 16, "width": 8, "widthDispersion": 8 } Agtk.objectInstances.get(instanceId).execCommandSceneShake(args); })()
  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • fadeIn: Value true/false
    • True = Fade-in
    • False = Don't Fade-in

  • fadeOut: Value true/false
    • True = Fade-out
    • False = Don't Fade-out

  • interval300: Value 0+. NOTE: 300 = 1sec

  • height: Value 0+

  • heightDispersion: Value 0+. Fluctuation

  • width: Value 0+

  • widthDispersion: Value 0+. Fluctuation
Show Effect
Object Self:
(function(){ var args = { "effectId": -1, "positionType": 0, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "duration300": 300, "durationUnlimited": false } Agtk.objectInstances.get(instanceId).execCommandEffectShow(args); })()
  • effectId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any effects you may have created

  • positionType: Value 0 - 1
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't use

  • connectId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Connection Points you may have created

  • adjustX: Value any integer

  • adjustY: Value any integer

  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Time Limited to 'duration300' setting
Hide Effects
Object Self:
(function(){ var args = { "effectId": -2, "targettingType": 5, "targetObjectType": 0, "targetObjectGroup": -1, "targetObjectId": -1 } Agtk.objectInstances.get(instanceId).execCommandEffectRemove(args); })()
  • effectId: Value -2, -1, 1+
    • -2 = All Effects
    • -1 = Not Set
    • 1+ = Any effects you may have created

  • targettingType: Value 0, 1, 5
    • 0 = Set by Object Group
    • 1 = Set by Object
    • 5 = Effects in the current scene

  • targetObjectType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • targetObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • targetObjectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Show Particles
Object Self:
(function(){ var args = { "particleId": -1, "positionType": 0, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "duration300": 300, "durationUnlimited": false } Agtk.objectInstances.get(instanceId).execCommandParticleShow(args); })()
  • particleId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any particles you may have created

  • positionType: Value 0 - 1
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't use

  • connectId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Connection Points you may have created

  • adjustX: Value any integer

  • adjustY: Value any integer

  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Time Limited to 'duration300' setting
Hide Particles
Object Self:
(function(){ var args = { "particleId": -2, "targettingType": 5, "targetObjectType": 0, "targetObjectGroup": -1, "targetObjectId": -1 } Agtk.objectInstances.get(instanceId).execCommandParticleRemove(args); })()
  • particleId: Value -2, -1, 1+
    • -2 = All Particles
    • -1 = Not Set
    • 1+ = Any particles you may have created

  • targettingType: Value 0, 1, 5
    • 0 = Set by Object Group
    • 1 = Set by Object
    • 5 = Particles Being Shown in Scene

  • targetObjectType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • targetObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • targetObjectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Disable Layer Display
Object Self:
(function(){ var args = { "layerIndex": -1, "exceptFlag": false } Agtk.objectInstances.get(instanceId).execCommandLayerHide(args); })()
  • layerIndex: Value -1 or 0+. Note: If non-existing layer, game will not crash but action will be null
    • -1 = Not Set
    • 0+ = Any created layers you may have, first layer = 0

  • exceptFlag: Value true/false
    • True = Disable Unselected Layers
    • False = Disable selected layer only
Enable Layer Display
Object Self:
(function(){ var args = { "layerIndex": -1, "exceptFlag": false } Agtk.objectInstances.get(instanceId).execCommandLayerShow(args); })()
  • layerIndex: Value -1 or 0+. Note: If non-existing layer, game will not crash but action will be null
    • -1 = Not Set
    • 0+ = Any created layers you may have, first layer = 0

  • exceptFlag: Value true/false
    • True = Enable Unselected Layers
    • False = Enable selected layer only
Disable Layer Motion
Object Self:
(function(){ var args = { "layerIndex": -1, "exceptFlag": false } Agtk.objectInstances.get(instanceId).execCommandLayerDisable(args); })()
  • layerIndex: Value -1 or 0+. Note: If non-existing layer, game will not crash but action will be null
    • -1 = Not Set
    • 0+ = Any created layers you may have, first layer = 0

  • exceptFlag: Value true/false
    • True = Disable Unselected Layers
    • False = Disable selected layer only
Enable Layer Motion
Object Self:
(function(){ var args = { "layerIndex": -1, "exceptFlag": false } Agtk.objectInstances.get(instanceId).execCommandLayerEnable(args); })()
  • layerIndex: Value -1 or 0+. Note: If non-existing layer, game will not crash but action will be null
    • -1 = Not Set
    • 0+ = Any created layers you may have, first layer = 0

  • exceptFlag: Value true/false
    • True = Enable Unselected Layers
    • False = Enable selected layer only
Change Camera Display Area
Object Self:
(function(){ var args = { "xRate": 1, "yRate": 1, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandCameraAreaChange(args); })()
  • xRate: Value float, some examples (but not limited too):
    • 0.5 = 50%
    • 1.5 = 150%
    • 2 = 200%

  • yRate: Value float, see above examples

  • duration300: Value 0.00+. NOTE: 300 = 1sec
Audio Playback
Object Self:
(function(){ var args = { "soundType": 0, "seId": -1, "voiceId": -1, "bgmId": -1, "loop": false, "fadein": false, "duration300": 300, "specifyAudioPosition": false, "audioPositionVariableObjectId": -1, "audioPositionVariableQualifierId": -1, "audioPositionVariableId": -1, "volume": 100, "pan": 0, "pitch": 0 } Agtk.objectInstances.get(instanceId).execCommandSoundPlay(args); })()
  • soundType: Value 0 - 2
    • 0 = Play Sound Effect
    • 1 = Play Voice
    • 2 = Play Background Music

  • seId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Sound Effects you may have added

  • voiceId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Voices you may have added

  • bgmId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Background Music you may have added

  • loop: Value true/false
    • True = Loop
    • False = No loop

  • fadein: Value true/false
    • True = Fade-in
    • False = No fade-in

  • duration300: Value 0.00+. This is for the 'fadeIn' NOTE: 300 = 1sec

  • specifyAudioPosition: Value true/false
    • True = Specify Playback Time
    • False = Don't use playback time

  • audioPositionVariableObjectId: Value -5, -2, -1, 0, 1+
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • audioPositionVariableQualifierId: Value -1
    • -1 = Single

  • audioPositionVariableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • volume: Value 0 - 100

  • pan: Value -50 - 50

  • pitch: Value -50 - 50
Stop Audio Item
Object Self:
(function(){ var args = { "soundType": 0, "seId": -1, "voiceId": -1, "bgmId": -1, "fadeout": false, "duration300": 300, "stopOnlySoundByThisObject": false } Agtk.objectInstances.get(instanceId).execCommandSoundStop(args); })()
  • soundType: Value 0 - 2
    • 0 = Sound Effects
    • 1 = Voices
    • 2 = Background Music

  • seId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Sound Effects you may have added

  • voiceId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Voices you may have added

  • bgmId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Background Music you may have added

  • fadeout: Value true/false
    • True = Fade-out
    • False = No fade-out

  • duration300: Value 0.00+. This is for the 'fadeIn' NOTE: 300 = 1sec

  • stopOnlySoundByThisObject: Value true/false
    • True = Stops audio playback for this Object only
    • False = Stops audio all objects
NOTE: There is no API info for this runtime command. Props to Standard Enemy for finding it.
Save Playhead Start Time
Object Self:
(function(){ var args = { "soundType": 0, "variableObjectId": -1, "variableQualifierId": -1, "variableId": -1 } Agtk.objectInstances.get(instanceId).execCommandSoundPositionRemember(args); })()
  • soundType: Value 0 - 2
    • 0 = Sound Effects
    • 1 = Voices
    • 2 = Background Music

  • variableObjectId: Value -5, -2, -1, 0, 1+
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • variableQualifierId: Value -1
    • -1 = Single

  • variableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values
Play Video
Object Self:
(function(){ var args = { "movieId": -1, "loop": false, "volume": 100, "defaultSize": true, "width": 256, "height": 256, "positionType": 0, "useConnect": false, "connectId": -1, "vertAlign": 0, "horzAlign": 0, "adjustX": 0, "adjustY": 0, "hideOnObjectActionChange": false, "stopObject": false, "stopGame": false, "fillBlack": false, "priority": false, "priorityMostFront": true, "priorityType": 1 } Agtk.objectInstances.get(instanceId).execCommandMovieShow(args); })()
  • movieId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any video ID's you may have

  • loop: Value true/false
    • True = Loop
    • False = No loop

  • volume: Value 0 - 100

  • defaultSize: Value true/false
    • True = Default video size
    • False = Adjusted video size

  • width: Value 0+

  • height: Value 0+

  • positionType: Value 0 - 2
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object
    • 2 = Use Scene as Base

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't Use

  • connectId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Connection Points you may have added

  • vertAlign: Value 0 - 2
    • 0 = Center
    • 1 = Top
    • 2 = Bottom

  • horzAlign: Value 0 - 2
    • 0 = Center
    • 1 = Left
    • 2 = Right

  • adjustX: Value any integer

  • adjustY: Value any integer

  • hideOnObjectActionChange: Value true/false
    • True = Hide on Object Action Change
    • False = Don't hide on action change

  • stopObject: Value true/false
    • True = Stop All Object Motions During Video Playback
    • False = Don't stop motions

  • stopGame: Value true/false
    • True = Pause Game During Video Playback
    • False = Don't pause game

  • fillBlack: Value true/false
    • True = Dim Areas Outside Video
    • False = Don't dim

  • priority: Value true/false
    • True = Position
    • False = Don't adjust position

  • priorityMostFront: Value true/false
    • True = Frontmost
    • False = Not frontmost (note only priorityType value of 0 will be false)

  • priorityType: Value 0 - 2
    • 0 = Background
    • 1 = Frontmost
    • 2 = Frontmost + Menu Scene
Display Image
Object Self:
(function(){ var args = { "imageId": -1, "defaultSize": true, "width": 256, "height": 256, "positionType": 0, "useConnect": false, "connectId": -1, "vertAlign": 0, "horzAlign": 0, "adjustX": 0, "adjustY": 0, "duration300": 300, "durationUnlimited": false, "hideOnObjectActionChange": false, "closeByOk": false, "stopObject": false, "stopGame": false, "priority": false, "priorityMostFront": true, "priorityType": 1 } Agtk.objectInstances.get(instanceId).execCommandImageShow(args); })()
  • imageId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any video ID's you may have

  • defaultSize: Value true/false
    • True = Use Default Size
    • False = Use Adjust Size

  • width: Value 0+

  • height: Value 0+

  • positionType: Value 0 - 2
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object
    • 2 = Use Scene as Base

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't Use

  • connectId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Connection Points you may have added

  • vertAlign: Value 0 - 2
    • 0 = Center
    • 1 = Top
    • 2 = Bottom

  • horzAlign: Value 0 - 2
    • 0 = Center
    • 1 = Left
    • 2 = Right

  • adjustX: Value any integer

  • adjustY: Value any integer

  • duration300: Value 0+. A value of 300 = 1 second

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Time Limit based on duration300 value

  • hideOnObjectActionChange: Value true/false
    • True = Hide on Object Action Change
    • False = Don't hide on action change

  • closeByOk: Value true/false
    • True = Press OK to Close Image
    • False = OK won't close

  • stopObject: Value true/false
    • True = Stop All Object Motions During Video Playback
    • False = Don't stop motions

  • stopGame: Value true/false
    • True = Pause Game During Video Playback
    • False = Don't pause game

  • fillBlack: Value true/false
    • True = Dim Areas Outside Video
    • False = Don't dim

  • priority: Value true/false
    • True = Position
    • False = Don't adjust position

  • priorityMostFront: Value true/false
    • True = Frontmost
    • False = Not frontmost (note only priorityType value of 0 will be false)

  • priorityType: Value 0 - 2
    • 0 = Background
    • 1 = Frontmost
    • 2 = Frontmost + Menu Scene
Show Text
NOTE: Text Resource options 'Font', 'Character Spacing', and 'Line Spacing' are only available in the normal Runtime Action as they are essentially an extension to the Text resource tab.

Object Self:
(function(){ var args = { "textFlag": true, "textId": -1, "variableObjectId": -1, "variableQualifierId": -1, "variableId": -1, "fontId": -1, "digitFlag": false, "digits": 0, "zeroPadding": false, "comma": false, "withoutDecimalPlaces": false, "colorA": 255, "colorR": 255, "colorG": 255, "colorB": 255, "windowType": 0, "templateId": 0, "imageId": -1, "windowTransparency": 0, "windowWidth": 256, "windowHeight": 256, "positionType": 0, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "topBottomMargin": 10, "leftRightMargin": 10, "horzAlign": 0, "vertAlign": 0, "duration300": 300, "durationUnlimited": false, "actionChangeHide": false, "closeByKey": false, "keyId": -1, "objectStop": false, "gameStop": false, "priorityMostFront": false, "priority": false, "priorityType": 1 } Agtk.objectInstances.get(instanceId).execCommandMessageShow(args); })()
  • textFlag: Value true/false
    • True = Text Resources
    • False = Variables

  • textId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Text resource ID's you may have

  • variableObjectId: Value -5, -2, -1, 0, 1+
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • variableQualifierId: Value -1
    • -1 = Single

  • variableId: Value -1 (None) or 1+. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • fontId: Value -1, 1+. NOTE: This is referring to the Show Variable option only. You cannot change the Font on the Text Resources option via script, that can only be done in the normal Runtime Action
    • -1 = None
    • 1+ = Any Font resource ID's you may have

  • digitFlag: Value true/false
    • True = Set No. of Digits
    • False = Don't Set

  • digits: Value 0+. How many digits to show

  • zeroPadding: Value true/false
    • True = Add Zeroes
    • False = Don't add zeroes

  • comma: Value true/false
    • True = Delimit with "," *Money notation
    • False = Don't

  • withoutDecimalPlaces: Value true/false
    • True = Hide Decimals
    • False = Don't hide

  • colorA: Value 0 - 255

  • colorR: Value 0 - 255

  • colorG: Value 0 - 255

  • colorB: Value 0 - 255

  • windowType: Value -1, 0, 1
    • -1 = None
    • 0 = Select from Templates
    • 1 = Select from Image Resource

  • templateId: Value 0 - 2
    • 0 = Blank Frame
    • 1 = Black
    • 2 = White

  • imageId: Value -1, 1+
    • -1 = None
    • 1+ = Any Image resource ID's you may have

  • windowTransparency: Value 0 - 100

  • windowWidth: Value 0+

  • windowHeight: Value 0+

  • positionType: Value 0 - 2
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object
    • 2 = Use Scene as Base

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't use

  • connectId: Value -1, 1+
    • -1 = None
    • 1+ = Any Connection Point ID's you may have

  • adjustX: Value any integer. Referring to 'Use Scene as Base'

  • adjustY: Value any integer. Referring to 'Use Scene as Base'

  • topBottomMargin: Value any integer

  • leftRightMargin: Value any integer

  • horzAlign: Value 0 - 2
    • 0 = Left
    • 1 = Center
    • 2 = Right

  • vertAlign: Value 0 - 2
    • 0 = Top
    • 1 = Center
    • 2 = Bottom

  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Use duration300 time

  • actionChangeHide: Value true/false
    • True = Hide on Object Action Change
    • False = Don't hide

  • closeByKey: Value true/false
    • True = Hide Message on Specified Input
    • False = Don't Hide

  • keyId: Value -1 and 1+ varying. NOTE: Refer to the section 'Find Control Key ID's' for specific key ID's (both default and custom)
    • -1 = None
    • 1 - 27 (varying) = Default keys
    • 1000+ = Any custom key ID's you may have

  • objectStop: Value true/false
    • True = Stop All Object Motions During Message Display
    • False = Don't stop

  • gameStop: Value true/false
    • True = Pause Game During Message Display
    • False = Don't pause

  • priorityMostFront: Value true/false
    • True = Frontmost
    • False = Not frontmost (note only priorityType value of 0 will be false)

  • priority: Value true/false
    • True = Position
    • False = No Positioning

  • priorityType: Value 0 - 2
    • 0 = Background
    • 1 = Frontmost
    • 2 = Frontmost + Menu Scene
Show Scrolling Text
NOTE: Text Resource options 'Font', 'Character Spacing', and 'Line Spacing' are only available in the normal Runtime Action as they are essentially an extension to the Text resource tab.

Object Self:
(function(){ var args = { "textId": -1, "colorA": 255, "colorR": 255, "colorG": 255, "colorB": 255, "backgroundType": 0, "templateId": 1, "imageId": -1, "backgroundTransparency": 0, "backgroundWidth": 256, "backgroundHeight": 256, "positionType": 0, "useConnect": false, "connectId": -1, "adjustX": 0, "adjustY": 0, "horzAlign": 0, "topBottomMargin": 10, "leftRightMargin": 10, "scrollSpeed": 1, "scrollUp": true, "actionChangeHide": false, "speedUpByKey": false, "keyId": -1, "objectStop": false, "gameStop": false, "priorityMostFront": false, "priority": false, "priorityType": 1 } Agtk.objectInstances.get(instanceId).execCommandScrollMessageShow(args); })()
  • textId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any Text resource ID's you may have

  • colorA: Value 0 - 255

  • colorR: Value 0 - 255

  • colorG: Value 0 - 255

  • colorB: Value 0 - 255

  • backgroundType: Value -1, 0, 1
    • -1 = Not Set
    • 0 = Select from Templates
    • 1 = Select from Image Resource

  • templateId: Value 1 - 2
    • 1 = Black
    • 2 = White

  • imageId: Value -1, 1+
    • -1 = None
    • 1+ = Any Image resource ID's you may have

  • backgroundTransparency: Value 0 - 100

  • backgroundWidth: Value 0+

  • backgroundHeight: Value 0+

  • positionType: Value 0 - 2
    • 0 = Center of This Object
    • 1 = Center of Object Locked by This Object
    • 2 = Use Scene as Base

  • useConnect: Value true/false
    • True = Use Connection Point
    • False = Don't use

  • connectId: Value -1, 1+
    • -1 = None
    • 1+ = Any Connection Point ID's you may have

  • adjustX: Value any integer. Referring to 'Use Scene as Base'

  • adjustY: Value any integer. Referring to 'Use Scene as Base'

  • horzAlign: Value 0 - 2
    • 0 = Left
    • 1 = Center
    • 2 = Right

  • topBottomMargin: Value any integer

  • leftRightMargin: Value any integer

  • scrollSpeed: Value any float. 1 = 1 second

  • scrollUp: Value true/false
    • True = Bottom to Top
    • False = Top to Bottom

  • actionChangeHide: Value true/false
    • True = Hide on Object Action Change
    • False = Don't hide

  • speedUpByKey: Value true/false
    • True = Speed Up on Input
    • False = Don't allow speed up

  • keyId: Value -1 and 1+ varying. NOTE: Refer to the section 'Find Control Key ID's' for specific key ID's (both default and custom)
    • -1 = None
    • 1 - 27 (varying) = Default keys
    • 1000+ = Any custom key ID's you may have

  • objectStop: Value true/false
    • True = Stop All Object Motions During Message Display
    • False = Don't stop

  • gameStop: Value true/false
    • True = Pause Game During Message Display
    • False = Don't pause

  • priorityMostFront: Value true/false
    • True = Frontmost
    • False = Not frontmost (note only priorityType value of 0 will be false)

  • priority: Value true/false
    • True = Position
    • False = No Positioning

  • priorityType: Value 0 - 2
    • 0 = Background
    • 1 = Frontmost
    • 2 = Frontmost + Menu Scene
Change Game Speed
Object Self:
(function(){ var args = { "gameSpeed": 100, "duration300": 300, "durationUnlimited": false, "targetObject": false, "targetEffect": false, "targetTile": false, "targetMenu": false, "targettingType": 0, "targetObjectType": 1, "targetObjectGroup": 0, "targetObjectId": -1, "targetQualifierId": -1, "excludePlayerObject": false, "excludeEnemyObject": false, "excludeObjectGroupBit": 0 } Agtk.objectInstances.get(instanceId).execCommandGameSpeedChange(args); })()
  • gameSpeed: Value 0+

  • duration300: Value 0.00+. NOTE: 300 = 1sec

  • durationUnlimited: Value true/false
    • True = No Time Limit
    • False = Limited by time set in duration300

  • targetObject: Value true/false
    • True = Objects
    • False = No objects

  • targetEffect: Value true/false
    • True = Effects
    • False = No effects

  • targetTile: Value true/false
    • True = Tiles
    • False = No tiles

  • targetMenu: Value true/false
    • True = Menu Related
    • False = No menus

  • targettingType: Value 0-3.
    • 0 = Set by Object Group
    • 1 = Set by Object
    • 2 = Objects Touching This Object (STRONGLY recommend not using script for this option)
    • 3 = Objects Locked by This Object

  • targetObjectType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • targetObjectGroup: Value -1+ depending on amount of Groups. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • targetObjectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • targetQualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • excludePlayerObject: Value true/false
    • True = Player Group is selected
    • False = Not selected

  • excludeEnemyObject: Value true/false
    • True = Enemy Group is selected
    • False = Not selected

  • excludeObjectGroupBit: Value whole numbers. STRONGLY recommend not using script for this option, seems to based off the bit pattern the Groups are stored in.
Timer Function
Object Self:
(function(){ var args = { "start": true, "timerVariableObjectId": -1, "timerVariableQualifierId": -1, "timerVariableId": -1, "countUp": true, "secondType": 0, "second300": 300, "secondVariableObjectId": -1, "secondVariableQualifierId": -1, "secondVariableId": -1 } Agtk.objectInstances.get(instanceId).execCommandTimer(args); })()
  • start: Value true/false
    • True = Start
    • False = Stop

  • timerVariableObjectId: Value -5, -2, -1, 0, 1+.
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • timerVariableQualifierId: Value -1
    • -1 = Single

  • timerVariableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • countUp: Value true/false
    • True = Count Up
    • False = Count Down

  • secondType: Value 0 - 1
    • 0 = Input Seconds
    • 1 = Set by Variable

  • second300: Value 0.00+. 300 = 1 second if secondType is 0

  • secondVariableObjectId: Value -5, -2, -1, 0, 1+.
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • secondVariableQualifierId: Value -1
    • -1 = Single

  • secondVariableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values
End Scene
Object Self:
(function(){ Agtk.objectInstances.get(instanceId).execCommandSceneTerminate(); })()
Show Menu Screen
Object Self:
(function(){ var args = { "layerId": -1, "useEffect": false, "effectType": -1, "fadein": false, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandMenuShow(args); })()
  • layerId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any menu scene layers you may have (1 being the far left tab)

  • useEffect: Value true/false
    • True = Set Sequence
    • False = No sequence

  • effectType: Value -1, 0 - 3
    • -1 = Not Set
    • 0 = Slide Up
    • 1 = Slide Down
    • 2 = Slide Left
    • 3 = Slide Right

  • fadein: Value true/false
    • True = Fade-in
    • False = None

  • duration300: Value 0.00+. 300 = 1 second
Hide Menu Screen
Object Self:
(function(){ var args = { "hideExceptInitial": false, "useEffect": false, "effectType": -1, "fadeout": false, "duration300": 300, "disableObjects": true } Agtk.objectInstances.get(instanceId).execCommandMenuHide(args); })()
  • hideExceptInitial: Value true/false
    • True = Hide All Except Default Display Menu
    • False = Hide only last shown menu

  • useEffect: Value true/false
    • True = Set Sequence
    • False = No sequence

  • effectType: Value -1, 0 - 3
    • -1 = Not Set
    • 0 = Slide Up
    • 1 = Slide Down
    • 2 = Slide Left
    • 3 = Slide Right

  • fadeout: Value true/false
    • True = Fade-out
    • False = None

  • duration300: Value 0.00+. 300 = 1 second

  • disableObjects: Value true/false
    • True = Disable Object
    • False = Don't disable
Load a File
Object Self:
(function(){ var args = { "projectCommonVariables": true, "projectCommonSwitches": true, "sceneAtTimeOfSave": true, "objectsStatesInSceneAtTimeOfSave": true, "effectType": -1, "duration300": 300 } Agtk.objectInstances.get(instanceId).execCommandFileLoad(args); })()
  • projectCommonVariables: Value true/false
    • True = Project Common Variables
    • False = Don't include

  • projectCommonSwitches: Value true/false
    • True = Project Common Switches
    • False = Don't include

  • sceneAtTimeOfSave: Value true/false
    • True = Scene at time of Save
    • False = Don't include

  • objectsStatesInSceneAtTimeOfSave: Value true/false
    • True = Objects States in Scene at time of Save
    • False = Don't include

  • effectType: Value -1, 0 - 5
    • -1 = Not Set
    • 0 = Black
    • 1 = White
    • 2 = Slide Up
    • 3 = Slide Down
    • 4 = Slide Left
    • 5 = Slide Right

  • duration300: Value 0.00+. 300 = 1 second
Change Animation Set
Object Self:
(function(){ var args = { "objectId": -1, "qualifierId": -1, "resourceSetId": -1 } Agtk.objectInstances.get(instanceId).execCommandResourceSetChange(args); })()
  • objectId: Value -2, -1, 1+
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • qualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • resourceSetId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Any animation sets you may have associated with that objectId
Apply Database
Object Self:
(function(){ var args = { "objectId": -1, "databaseId": -1, "fromObject": true, "fromRow": true, "columnIndex": -1, "rowIndex": -1, "rowIndexFromName": true, "rowNumberFromValue": true, "columnIndexFromName": true, "columnNumberFromValue": true, "rowVariableObjectId": -1, "rowVariableId": -1, "rowVariableQualifierId": -1, "columnVariableObjectId": -1, "columnVariableId": -1, "columnVariableQualifierId": -1, "reflectObjectId": -1, "reflectVariableId": -1, "reflectQualifierId": -1, "reflectVariableAssignOperator": 0 } Agtk.objectInstances.get(instanceId).execCommandDatabaseReflect(args); })()
----- Link Condition Templates -----
How this section will read:
  1. Copy paste script template with the default settings
  2. Explanation of the args and values
  3. Reference to the API
Contact with Tile's Wall Detection
Object Self:
(function(){ var args = { "wallBit": 0, "useTileGroup": false, "tileGroup": 0 } var condition = Agtk.objectInstances.get(instanceId).isWallTouched(args); if(condition){ return true; } return false; })()
  • wallBit: Value 0 - 15
    • 0 = No wall sides selected
    • 1 = Top
    • 2 = Left
    • 3 = Left, Top
    • 4 = Right
    • 5 = Top, Right
    • 6 = Left, Right
    • 7 = Left, Top, Right
    • 8 = Bottom
    • 9 = Top, Bottom
    • 10 = Left, Bottom
    • 11 = Left, Top, Bottom
    • 12 = Right, Bottom
    • 13 = Top, Right, Bottom
    • 14 = Left, Bottom, Right
    • 15 = All wall sides selected

  • useTileGroup: Value true/false
    • True = Set by Target Tile Group
    • False = Check all Tile Group's

  • tileGroup: Value 0+
    • 0 = Default Tile Group
    • 1+ = Any other Tile Group's you have made in order of list
Contact with Tile's Wall Detection When Moving One Tile
Object Self:
(function(){ var args = { "wallBit": 0, "useTileGroup": false, "tileGroup": 0 } var condition = Agtk.objectInstances.get(instanceId).isWallAhead(args); if(condition){ return true; } return false; })()
  • wallBit: Value 0 - 15
    • 0 = No wall sides selected
    • 1 = Top
    • 2 = Left
    • 3 = Left, Top
    • 4 = Right
    • 5 = Top, Right
    • 6 = Left, Right
    • 7 = Left, Top, Right
    • 8 = Bottom
    • 9 = Top, Bottom
    • 10 = Left, Bottom
    • 11 = Left, Top, Bottom
    • 12 = Right, Bottom
    • 13 = Top, Right, Bottom
    • 14 = Left, Bottom, Right
    • 15 = All wall sides selected

  • useTileGroup: Value true/false
    • True = Set by Target Tile Group
    • False = Check all Tile Group's

  • tileGroup: Value 0+
    • 0 = Default Tile Group
    • 1+ = Any other Tile Group's you have made in order of list
Contact with Wall Detection of Other Objects
Object Self:
(function(){ var args = { "wallBit": 0, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectWallTouched(args); if(condition){ return true; } return false; })()
  • wallBit: Value 0 - 15
    • 0 = No wall sides selected
    • 1 = Top
    • 2 = Left
    • 3 = Left, Top
    • 4 = Right
    • 5 = Top, Right
    • 6 = Left, Right
    • 7 = Left, Top, Right
    • 8 = Bottom
    • 9 = Top, Bottom
    • 10 = Left, Bottom
    • 11 = Left, Top, Bottom
    • 12 = Right, Bottom
    • 13 = Top, Right, Bottom
    • 14 = Left, Bottom, Right
    • 15 = All wall sides selected

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Contact with Collision Detection of Other Objects
Object Self:
(function(){ var args = { "wallBit": 0, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectHit(args); if(condition){ return true; } return false; })()
  • wallBit: Value 0 - 15
    • 0 = No wall sides selected
    • 1 = Top
    • 2 = Left
    • 3 = Left, Top
    • 4 = Right
    • 5 = Top, Right
    • 6 = Left, Right
    • 7 = Left, Top, Right
    • 8 = Bottom
    • 9 = Top, Bottom
    • 10 = Left, Bottom
    • 11 = Left, Top, Bottom
    • 12 = Right, Bottom
    • 13 = Top, Right, Bottom
    • 14 = Left, Bottom, Right
    • 15 = All wall sides selected

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Hit an Attack Detection
Object Self:
(function(){ var args = { "wallBit": 0, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1, "attributeType": 0, "attributePresetId": 1, "attributeValue": 0, "attributeEqual": true } var condition = Agtk.objectInstances.get(instanceId).isAttackAreaTouched(args); if(condition){ return true; } return false; })()
  • wallBit: Value 0 - 15
    • 0 = No wall sides selected
    • 1 = Top
    • 2 = Left
    • 3 = Left, Top
    • 4 = Right
    • 5 = Top, Right
    • 6 = Left, Right
    • 7 = Left, Top, Right
    • 8 = Bottom
    • 9 = Top, Bottom
    • 10 = Left, Bottom
    • 11 = Left, Top, Bottom
    • 12 = Right, Bottom
    • 13 = Top, Right, Bottom
    • 14 = Left, Bottom, Right
    • 15 = All wall sides selected

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • -2 = Object Self
    • 1+ = Any created objects you may have

  • attributeType: Value 0-2.
    • 0 = Don't Set
    • 1 = Preset Attributes
    • 2 = Set by Value

  • attributePresetId: Value 1-8
    • 1 = Fire
    • 2 = Water
    • 3 = Earth
    • 4 = Wind
    • 5 = Lightning
    • 6 = Ice
    • 7 = Light
    • 8 = Dark

  • attributeValue: Value whole number

  • attributeEqual: Value true/false
    • True = Equal to
    • False = Not Equal to
Distance with Attack Detection
Object Self:
(function(){ var args = { "otherDirections": false, "objectDirection": true, "directionBit": 990, "distanceType": 0, "distance": 0, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1, "attributeType": 0, "attributePresetId": 1, "attributeValue": 0, "attributeEqual": true } var condition = Agtk.objectInstances.get(instanceId).isAttackAreaNear(args); if(condition){ return true; } return false; })()
  • otherDirections: Value true/false
    • True = Direction of Detected Attack: Other than Specified Direction
    • False = Not other than specified direction

  • objectDirection: Value true/false
    • True = This Object's Display Direction
    • False = Direction From This Object

  • directionBit: Value 0 - 990. STRONGLY RECOMMENDED to use the show log with this runtime action to get exact bit value depending on the combination of angles, however:
    • 990 = All Directions

  • distanceType: Value 0 - 2
    • 0 = Don't Set Distance
    • 1 = Set Distance: More Than Specified Distance
    • 2 = Set Distance: Less Than Specified Distance

  • distance: Value any whole number

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • attributeType: Value 0-2.
    • 0 = Don't Set
    • 1 = Preset Attributes
    • 2 = Set by Value

  • attributePresetId: Value 1-8
    • 1 = Fire
    • 2 = Water
    • 3 = Earth
    • 4 = Wind
    • 5 = Lightning
    • 6 = Ice
    • 7 = Light
    • 8 = Dark

  • attributeValue: Value whole number

  • attributeEqual: Value true/false
    • True = Equal to
    • False = Not Equal to
Distance with Other Objects
Object Self:
(function(){ var args = { "otherDirections": false, "objectDirection": true, "directionBit": 990, "distanceType": 0, "distance": 0, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1, } var condition = Agtk.objectInstances.get(instanceId).isObjectNear(args); if(condition){ return true; } return false; })()
  • otherDirections: Value true/false
    • True = Direction of Detected Attack: Other than Specified Direction
    • False = Not other than specified direction

  • objectDirection: Value true/false
    • True = This Object's Display Direction
    • False = Direction From This Object

  • directionBit: Value 0 - 990. STRONGLY RECOMMENDED to use the show log with this runtime action to get exact bit value depending on the combination of angles, however:
    • 990 = All Directions

  • distanceType: Value 0 - 2
    • 0 = Don't Set Distance
    • 1 = Set Distance: More Than Specified Distance
    • 2 = Set Distance: Less Than Specified Distance

  • distance: Value any whole number

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Face-to-Face with Other Objects
Object Self:
(function(){ var args = { "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectFacingEachOther(args); if(condition){ return true; } return false; })()
  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Object is facing another object
Object Self:
(function(){ var args = { "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectFacing(args); if(condition){ return true; } return false; })()
  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Discovered Other Objects
Object Self:
(function(){ var args = { "viewportId": -1, "discoveredAcrossLayersObject": false, "objectType": 0, "objectTypeByType": -1, "objectGroup": -2, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectFound(args); if(condition){ return true; } return false; })()
  • viewportId: Value -1, 1+
    • -1 = Not Set
    • 1+ = Field of Visions as you have created

  • discoveredAcrossLayersObject: Value true/false
    • True = Target All Layers
    • False = Target objects current layer only

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Other Objects Facing Specified Direction
Object Self:
(function(){ var args = { "otherDirections": false, "objectDirection": true, "directionBit": 990, "objectType": 0, "objectTypeByType": 0, "objectGroup": -1, "objectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isObjectFacingDirection(args); if(condition){ return true; } return false; })()
  • otherDirections: Value true/false
    • True = Orientation of Other Objects: Other than Specified Direction
    • False = Not other than specified direction

  • objectDirection: Value true/false
    • True = Same Orientation as This Object
    • False = Specific Direction

  • directionBit: Value 0 - 990. STRONGLY RECOMMENDED to use the show log with this runtime action to get exact bit value depending on the combination of angles, however:
    • 990 = All Directions

  • objectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • objectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • objectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
HP is 0
Object Self:
(function(){ var args = { "objectId": -2 } var condition = Agtk.objectInstances.get(instanceId).isHpZero(args); if(condition){ return true; } return false; })()
  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Going Off Camera
Object Self:
(function(){ var args = { "objectId": -2, "distanceFlag": false, "distance": 0 } var condition = Agtk.objectInstances.get(instanceId).isCameraOutOfRange(args); if(condition){ return true; } return false; })()
  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • distanceFlag: Value true/false
    • True = Set Distance
    • False = Don't Set Distance

  • distance: Value whole number 0+
Object is buried in a wall
Object Self:
(function(){ var args = { "objectId": -2 } var condition = Agtk.objectInstances.get(instanceId).isBuriedInWall(args); if(condition){ return true; } return false; })()
  • objectId: Value -3, -2, -1 or 1+.
    • -3 = Object Other Then Self
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Locked
Object Self:
(function(){ var args = { "lockingObjectId": -1, "lockedObjectType": 0, "lockedObjectTypeByType": 0, "lockedObjectGroup": -1, "lockedObjectId": -1 } var condition = Agtk.objectInstances.get(instanceId).isLocked(args); if(condition){ return true; } return false; })()
  • lockingObjectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • lockedObjectType: Value 0 - 1
    • 0 = Set by Object Group
    • 1 = Set by Object

  • lockedObjectTypeByType: Value anything. This may be a discontinued property as I couldn't find anything that this changes.

  • lockedObjectGroup: Value -1+ depending on amount of Groups. Only useable if objectType is not a value of 1. NOTE: If a value doesn't exist the game won't crash but the action will be null.
    • -1 = All Objects
    • 0 = Player Group
    • 1 = Enemy Group
    • 2+ = Any created groups you may have

  • lockedObjectId: Value -3, -1 or 1+.
    • -3 = Object Other Then Self
    • -1 = Not Set
    • 1+ = Any created objects you may have
Use Probability
Object Self:
(function(){ var args = { "probability": 0 } var condition = Agtk.objectInstances.get(instanceId).isProbability(args); if(condition){ return true; } return false; })()
  • probability: Value 0 - 100
Finished Showing All Motion
Object Self:
(function(){ var condition = Agtk.objectInstances.get(instanceId).isAnimationFinished(); if(condition){ return true; } return false; })()
Switch/Variable Changes
Checking for switch or variables values are much easier with basic scripting then by using this condition template so I recommend looking at section 'Targeting Switches & Variables' for easier switch/var conditions.

Object Self:
(function(){ var args = { "swtch": true, "switchObjectId": -1, "switchQualifierId": -1, "switchId": -1, "switchCondition": 0, "variableObjectId": -1, "variableQualifierId": -1, "variableId": -1, "compareVariableOperator": 0, "compareValueType": 0, "compareValue": 0.000000, "compareVariableObjectId": -1, "compareVariableQualifierId": -1, "compareVariableId": -1 } var condition = Agtk.objectInstances.get(instanceId).isSwitchVariableChanged(args); if(condition){ return true; } return false; })()
  • swtch: Value true/false
    • True = Switch
    • False = Variable

  • switchObjectId: Value -7, -5, -2, -1, 0, 1+.
    • -7 = Parent
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • switchQualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • switchId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default switch, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting switch values

  • switchCondition: Value 0 - 3
    • 0 = ON
    • 1 = OFF
    • 2 = OFF to ON
    • 3 = ON to OFF

  • variableObjectId: Value -7, -5, -2, -1, 0, 1+
    • -7 = Parent
    • -5 = Locked
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • variableQualifierId: Value -2, -1
    • -2 = All
    • -1 = Single

  • variableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values

  • compareVariableOperator: Value 0 - 5
    • 0 = Less than <
    • 1 = Less than or equal to <=
    • 2 = Equal to =
    • 3 = Greater than or equal to >=
    • 4 = Greater than >
    • 5 = Not equal to !=

  • compareValueType: Value 0 - 2
    • 0 = Constant
    • 1 = Set Variable as Condition
    • 2 = Non-numeric

  • compareValue: Value any float

  • compareVariableObjectId: Value -7, -2, -1, 0, 1+
    • -7 = Parent
    • -2 = Object Self
    • -1 = Not Set
    • 0 = Project Common
    • 1+ = Any created objects you may have

  • compareVariableQualifierId: Value -1
    • -1 = Single

  • compareVariableId: Value -1 (None) or any whole number. Value will depend on if Self or Common selected as well as if a created or default variable, so refer to section 'Targeting Switches & Variables' and 'Find Switch / Variable ID's' for info on getting variable values
Specified Object's Action Changes
Object Self:
(function(){ var args = { "objectId": -1, "actionObjectId": -1, "actionId": -1, "otherActions": false } var condition = Agtk.objectInstances.get(instanceId).isObjectActionChanged(args); if(condition){ return true; } return false; })()
  • objectId: Value -7, -5, -4, -2, -1 or 1+
    • -7 = Parent
    • -5 = Locked
    • -4 = Child
    • -2 = Object Self
    • -1 = Not Set
    • 1+ = Any created objects you may have

  • actionObjectId: Value -1 or 1+
    • -1 = None
    • 1+ = Any objects that you have created for a list of actions to pull from

  • actionId: Value -1 or 1+
    • -1 = None
    • 1+ = Any actions you may have

  • otherActions: Value true/false
    • True = When Not Doing Specified Actions
    • False = When Doing Specified Actions
Jump Peak Reached
Object Self:
(function(){ var condition = Agtk.objectInstances.get(instanceId).isJumpTop(); if(condition){ return true; } return false; })()
Contact with Slope
Object Self:
(function(){ var args = { "directionType": 0, "downwardType": 0 } var condition = Agtk.objectInstances.get(instanceId).isSlopeTouched(args); if(condition){ return true; } return false; })()
  • directionType: Value 0 - 2
    • 0 = From Top
    • 1 = From Bottom
    • 2 = Don't Set

  • downwardType: Value 0 - 2
    • 0 = Sloping Left
    • 1 = Sloping Right
    • 2 = Don't Set
1 条留言
JustusPan 2021 年 11 月 16 日 上午 7:52 
provide template script is a good idea to make a easy to use tutorial. Is it possible to translate this tutorial to other language? Or we have to create a brand new post for other language?