Danmakufu ph3 Documentation / Wiki
A comprehensive manual and wiki to Danmakufu ph3
-
Math - Mathematical operations, frequently used in generating dynamic patterns
-
Text - Loading fonts, converting integers to strings etc.
-
Path - Loading files, interfacing with the file system etc.
-
Time - Date/Time, Stage Time and FPS readings
-
Debug - Printing debug messages, assertions and error handling
-
Common Data - Share data between scripts
-
Audio - Play sound effects and music
-
Input - Get Keyboard and Mouse input
-
Render - Load textures manually, set Render Priority, render to Textures (snapshots), pixel shaders etc.
-
3D Camera - Adjust the 3D background camera
-
2D Camera - Adjust the 2D camera
-
Script - Load, Start and Close scripts
-
System - Manipulate score, graze and points, adjust render priorities and the STG frame parameters
-
Player - Adjust the player character
-
Enemy - Adjust enemies
-
Shot - Create bullets, lasers or clear them from the screen among other things
-
Item - Create and collect pick up items
-
Other / Misc - Misc functions (Time Slow, Line-Circle and Object-Object collision tests, 2D position etc.)
-
Objects - Base object functions all objects support
-
Player Main - Create player shots or use spell cards
-
Player Spell Object Functions - Adjust player spellcard behavior
-
Private System - Set pause, replay and end scripts
-
Custom Script Functions - Control shot deletion
-
Package - Set pause, replay and end scripts
-
Redundant - Language operator implementation functions
-
Unimplemented - Unfinished functions
Math
Mathematical operations, frequently used in generating dynamic patterns
-
-
-
log(int val)
Returns the natural (base e) logarithm of the value.
-
-
cos(int val)
Returns the cosine of the angle. Cosine is a value between -1 and 1 that corresponds to the x-value in a coordinate plane.
-
sin(int val)
Returns the sine of the angle. Sine is a value between -1 and 1 that corresponds to the y-value in a coordinate plane.
-
tan(int val)
Returns the tangent of the angle. Tangent is the slope of the line created by the angle (x/y).
-
acos(int val)
Returns the arccosine of the angle. acos(cos(x)) = x, if x is between 0 and 180.
-
asin(int val)
Returns the arcsine of the value. asin(sin(x)) = x, if x is between -90 and 90.
-
atan(int val)
Returns the arctangent of the value. atan(tan(x)) = x, if x is between -90 and 90.
-
atan2(int y, int x)
Returns the arctangent of y/x, which is the angle from (0, 0) to (x, y).
The angle will be in the range -180 < a <= 180, where a is the returned value. Useful for getting the angle from one point to another point. For example, the angle from the boss to the player is atan2(player y - boss y, player x - boss x).
-
rand(min, max)
Returns a random value between the two values. Note that the random value is not an integer; if you need one, use either round(), ceil(), or floor() on the returned value.
-
round(int val)
Returns the value as an integer. Values of 0.5 or greater are rounded up; otherwise they are rounded down.
-
truncate(int val)
Returns the value with no decimal places. For instance, 1.123 becomes 1. The shortened name trunc can also be used to refer to this function.
-
-
-
absolute(int val)
Returns the value as an absolute number (if it is negative, it will be changed to a positive).
-
modc(value, divider)
Returns a modulus of the first value. Modulus provides the remainder of the division (7 modulo 5 would be 2).
Note: unlike remainder, modc returns a value with the same sign as the dividend: modc(-7, 4) equals -3 and modc(7, -4) equals 3.
-
round(int val)
Returns the value as an integer. Values of 0.5 or greater are rounded up; otherwise they are rounded down.
-
pi()
Returns the value of pi.
Text Functions
Loading fonts, converting integers to strings etc.
-
LoadFont(char[] path)
Loads the given font, which can be used with ObjText_SetFontType, allowing for usage of fonts that are not standard to Windows. Returns true if successful.
Note, anything other than a Shift-JIS font will not be displayed properly if Danmakufu is run with AppLocale (before ph3 [.1 pre2]).
-
ToString(int value)
Returns the value as a string, able to be used by text functions. (Text functions cannot normally read numbers.)
-
-
itoa(int value)
Converts an integer value to a string, but leaves out decimal places. (This function might behave identically to IntToString.)
-
-
rtos(char[] format, int value)
Returns the value as a string, with some filtering options. The format is presented as a string that determines how many digits will be shown; it can contain any combination of the following three characters: "0", ".", "#". "0" is a slot for a digit. "." represents the decimal place in the string. "#" creates a space in the string.
For example, rtos("000.000", 1.23) = "001.230", and rtos("#00", 1.23) = " 01".
-
vtos(char[] format, int value)
Returns the value as a string, with some more filtering options.
Format:
- "-" right-justified
- "0" outputs 0 at unused places
- "d" integer
- "f" real
- "s" string
The format string is different from rtos in that it's more of a code than directly defining the digits that will be shown. First, the number of digits on each side of the decimal are specified (000.00 is 3.2 in the format string). Unused digits will be filled with spaces. If preceded by a "-", the digits will be right-justified, adding blank spaces to the right instead of the left. If preceded by a "0", all digits not occupied by the value will be filled by zeroes. If ended with a "d", the value will be presented as an integer. If ended with an "f", the value will be presented as a real number. If ended with an "s", this indicates the value given was in the form of a string.
For example, vtos("03d", 1.23) = "001", vtos("3d", 1.23) = " 1", vtos("-3d", 1.23) = "1 ", and vtos("03.5f", 1.23) = "001.23000"
-
atoi(char[] string)
Converts a string to an integer. If there is a decimal part, then it will be truncated. If the string does not represent a valid number, then 0 will be returned.
-
ator(char[] string)
Converts a string to a real number. If the string does not represent a valid number, then 0 will be returned.
-
TrimString(char[] string)
Returns the string with spaces removed from the beginning and ending of the text. For example, TrimString(" ABC ") will return "ABC".
-
Path Functions
Loading files, interfacing with the file system etc.
-
GetFileDirectory(char[] path)
Returns the directory of the specified file path. Specifically, returns the input string up to the rightmost forward slash, with backslashes removed.
-
-
-
-
-
-
-
-
GetScriptPathList(char[] path, int scriptType)
Returns an array of available (selectable at selection screen) scripts of the specified type within the directory of the specified path. Script types are:
- TYPE_SCRIPT_ALL: All scripts
- TYPE_SCRIPT_PLAYER: Player scripts
- TYPE_SCRIPT_SINGLE: Single scripts
- TYPE_SCRIPT_PLURAL: Plural scripts
- TYPE_SCRIPT_STAGE: Stage scripts
- TYPE_SCRIPT_PACKAGE: Package scripts
Time
Date/Time, Stage Time and FPS readings
-
GetCurrentDateTimeS
Returns a string containing the current date and time. For example, if the current date is 2012/09/16 12:34:56, then "20120916123456" will be returned. If you wanted to convert it to a number, you may use the atoi function; for example, let year = atoi(GetCurrentDateTimeS[0..4]);
-
GetStageTime
Returns a number with the amount of time that has been elapsed since the start of the main script. The value is in milliseconds.
-
GetPackageTime
Returns a number with the amount of time that has been elapsed since the start of the package script. The value is in milliseconds.
-
-
GetReplayFps
Returns the FPS of the replay at the current time. Note that this value refreshes as a much slower rate than GetCurrentFps.
Debug
Printing debug messages, assertions and error handling
-
-
RaiseError(char[] message)
Creates an error box with the specified string. Execution of the script is stopped, closing the script.
-
Common Data
Share data between scripts
-
SetCommonData(char[] key, var val)
Maps the given key to the given value in common data. Uses the default common data area. The value can be returned by using GetCommonData with the corresponding key.
-
GetCommonData(char[] key, var val)
Returns the value associated with the given key in common data. Returns the default value if no value had been stored to it previously.
-
-
-
-
-
-
-
CreateCommonDataArea(char[] area)
Creates a common data area to organize common data together. A common data area "" (empty string) has been created by default, which is also used by the SetCommonData series.
-
-
-
-
-
-
LoadCommonDataAreaA1(char[] area)
Loads everything in the specified common data area from the saved data file. Returns true if successful and false if the operation failed.
-
-
-
SaveCommonDataAreaToReplayFile(char[] area)
Saves the specified common data area to the replay file. Returns true if successful and false if the operation failed. If this function is called during a replay, Danmakufu will present an error.
-
LoadCommonDataAreaFromReplayFile(char[] area)
Loads the specified common data area from the replay file. Returns true if successful and false if the operation failed. If this function is called during gameplay, Danmakufu will present an error.
Audio
Play sound effects and music
-
LoadSound(char[] path)
Loads specified sound file.
Note: You must use this function before using PlayBGM or PlaySE, in the same script as these two functions are called on the respective paths.
-
-
-
-
Input
Get Keyboard and Mouse input
Key States
Key State |
Description |
Key State |
Description |
KEY_FREE |
While the key is up |
KEY_PUSH |
The frame the key is pressed |
KEY_HOLD |
While the key is held down |
KEY_PULL |
The frame the key is released |
Virtual Key List
Key Constant |
Description |
Key Constant |
Description |
VK_LEFT |
Move Left |
VK_RIGHT |
Move Right |
VK_UP |
Move Up |
VK_Down |
Move Down |
VK_SHOT |
Shot |
VK_BOMB |
Bomb / Spell Card |
VK_SLOWMOVE |
Focus / Slow movement |
VK_USER1 |
User Key 1 |
VK_USER2 |
User Key 2 |
VK_OK |
Accept |
VK_CANCEL |
Cancel |
VK_PAUSE |
Pause |
Key List
Key Constant |
Keyboard Key |
Key Constant |
Keyboard Key |
KEY_0 ... KEY_9 |
0-9 Keys |
KEY_A ... KEY_Z |
A-Z Keys |
KEY_F1 ... KEY_F10 |
Function Keys |
KEY_MINUS |
- Key |
KEY_EQUALS |
= |
KEY_SLASH |
/ |
KEY_BACK |
Backspace |
KEY_TAB |
Tab |
KEY_SPACE |
Space |
KEY_LBRACKET |
[ |
KEY_RBRACKET |
] |
KEY_SEMICOLON |
: |
KEY_APOSTROPHE |
' |
KEY_GRAVE |
` |
KEY_BACKSLASH |
\ |
KEY_YEN |
\ |
KEY_AT |
@ |
KEY_COLON |
: |
KEY_UNDERLINE |
_ |
KEY_CIRCUMFLEX |
^ |
KEY_COMMA |
, |
KEY_PERIOD |
. |
KEY_INSERT |
Insert |
KEY_DELETE |
Delete |
KEY_RETURN |
Return / Enter |
KEY_LCONTROL |
Left Control |
KEY_RCONTROL |
Right Control |
KEY_LSHIFT |
Left Shift |
KEY_RSHIFT |
Right Shift |
KEY_LEFT |
Left Arrow |
KEY_RIGHT |
Right Arrow |
KEY_UP |
Up Arrow |
KEY_DOWN |
Down Arrow |
KEY_NUMPAD0 ... KEY_NUMPAD9 |
Number Pad |
KEY_ADD |
Number Pad + |
KEY_SUBTRACT |
Number Pad - |
KEY_MULTIPLY |
Number Pad * |
KEY_DIVIDE |
Number Pad / |
KEY_DECIMAL |
Number Pad . |
KEY_NUMPADEQUALS |
Number Pad = |
-
-
SetVirtualKeyState(enum KeyCode key, enum KeyState keyState)
Temporarily sets the given virtual key to the given state.
The virtual key will be restored to its true state a frame after you stop calling this function.
Keep in mind that if you set it to KEY_HOLD it will not go to KEY_PULL or KEY_PUSH.
Refer to this list of Virtual Keys and Key States.
-
AddVirtualKey(enum KeyCode virtualKeyName, enum KeyCode keyName, enum KeyCode gamepadKey)
Registers the given virtual key with the given key.
You may map any number of virtual keys to a single key, but virtual keys may only be mapped to a single key.
For an example, if you were to use AddVirtualKey(VK_SHOT, KEY_UP, KEY_INVALID);, whenever you press the up arrow key, the virtual shot key will be pressed.
Take note that you will not be able to move up. To fix this, you add AddVirtualKey(VK_UP, KEY_UP, KEY_INVALID);. You will now shoot and move up at the same time.
However, if you were to add AddVirtualKey(VK_UP, KEY_LEFT, KEY_INVALID); with the above two examples, you will not move up when you press up, because VK_UP has been remapped to KEY_LEFT.
Refer to this list of Virtual Keys and Key States.
-
-
-
-
GetMouseX()
Returns the mouse's X coordinate. The origin for the mouse coordinates is the upper left of the Danmakufu window (0, 0).
Mouse coordinates will be properly adjusted according to the resizing of Danmakufu's window.
-
GetMouseY()
Returns the mouse's Y coordinate. The origin for the mouse coordinates is the upper left of the Danmakufu window (0, 0).
Mouse coordinates will be properly adjusted according to the resizing of Danmakufu's window.
-
GetMouseMoveZ()
Returns the amount of change that has occurred to the mouse's Z axis.
The Z axis is normally the middle mouse wheel. If there is no mouse wheel, the value will be 0.
The value returned will be negative if the wheel was moved back, and positive if the wheel moved forward.
-
SetSkipModeKey()
Specifies the key to use for fast playback mode. (Specify KEY_INVALID if you do not wish to enable fast playback)
The default key is KEY_LCONTROL.
Render
Load textures manually, set Render Priority, render to Textures (snapshots), pixel shaders etc.
-
-
LoadTextureInLoadThread(char[] path)
Loads specified image file as a texture in a separate thread.
Using this function inside @Loading is the same as using LoadTexture.
When using large images, the script will freeze until the image has finished loading.
-
-
-
-
-
-
-
-
-
CreateRenderTarget(char[] name)
Can create a custom render target outside of the reserved ones. To use, ObjPrim_SetTexture must have the name of the render target as a string.
Example:
CreateRenderTarget("My Render Target");
ObjPrim_SetTexture(objname,"My Render Target");
Returns true if the render target was successfully created.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3D Camera
Adjust the 3D background camera
2D Camera
Adjust the 2D camera
-
-
-
-
-
Set2DCameraRatioX(double xZoom)
Sets the magnification of the X axis of the 2D camera (centered on the focus point).
For example, if you set this value to 2, the x-axis will be doubled in size.
This value is usually 1.
If you specify a negative value, the x-axis will be flipped.
-
Set2DCameraRatioY(double yZoom)
Sets the magnification of the Y axis of the 2D camera (centered on the focus point).
For example, if you set this value to 2, the y-axis will be doubled in size.
This value is usually 1.
If you specify a negative value, the y-axis will be flipped.
-
Reset2DCamera()
Resets both the focus point and the zoom ratio, respectively to the center of the screen and 1.
-
-
-
-
-
-
Script
Load, Start and Close scripts
-
LoadScript(char[] scriptPath)
Loads and compiles the specified script, and returns its script ID.
Also calls @Loading and initializes global variables.
-
-
-
-
-
-
-
-
CloseStgScene()
Ends the current scene (returns to script selection screen).
-
-
-
-
-
-
SetAutoDeleteObject(bool isEnabled)
Sets whether to delete all existing objects that were created in the script at its termination.
If set to true, the script's objects will be deleted. The default value is false.
-
-
-
GetScriptInfoA1(char[] filePath, enum ScriptInfoType infoType)
Returns script info requested based on infotype
- INFO_SCRIPT_TYPE - Returns the script type (constant):
- TYPE_SCRIPT_PLAYER - Player script
- TYPE_SCRIPT_SINGLE - Single script
- TYPE_SCRIPT_PLURAL - Plural script
- TYPE_SCRIPT_STAGE - Stage script
- TYPE_SCRIPT_PACKAGE - Package script
- INFO_SCRIPT_PATH - Returns the script path (char).
- INFO_SCRIPT_ID - Returns the script #ID (char).
- INFO_SCRIPT_TITLE - Returns the script #Title (char).
- INFO_SCRIPT_TEXT - Returns the script #Text (char).
- INFO_SCRIPT_IMAGE - Returns the script #Image (char).
- INFO_SCRIPT_REPLAY_NAME - Returns the script #ReplayName (char).
System
Manipulate score, graze and points, adjust render priorities and the STG frame parameters
-
SetStgFrame(double left, double top, double right, double bottom, int priorityMin, int priorityMax)
Sets the STG space frame.
Default values are (32, 16, 416, 464, 20, 80).
-
-
-
-
-
GetPoint()
Returns the current amount of point items collected (default is the blue "点" item).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
IsReplay()
Returns true if a replay is playing, false otherwise.
-
AddArchiveFile(char[] archivePath)
Adds the path to use when reading images or sounds from an archive file. Returns true if the archive was successfully read, false otherwise.
Player
Adjust the player character
-
-
GetPlayerScriptID()
Returns the player's script ID. This function returns the same value as GetOwnScriptID when used inside the player script.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
GetPlayerState()
Returns the player state:
- STATE_NORMAL: the player is alive.
- STATE_HIT: the player has been hit. This state returns true during the counter bomb frames for the player.
- STATE_DOWN: after being killed, before reappearing.
- STATE_END: the amount of remaining lives has become 0 (game over).
-
-
GetPlayerClip()
Returns the player's clip in an array [left, top, right, bottom].
-
-
-
-
-
-
-
-
-
IsPermitPlayerSpell()
Returns true if the player can use bombs.
The returned value may differ from a previously set SetForbidPlayerSpell. For instance, it is forced to false during a LastSpell.
-
-
-
GetPlayerID()
Returns the system ID of the player script. This value is defined inside the player script in the #ID header.
-
GetPlayerReplayName()
Returns the replay ID of the player. This value is defined inside the player script in the #ReplayName header.
Enemy
Adjust enemies
-
-
GetAllEnemyID
Returns an array with the ID of every enemy present on the screen
-
GetIntersectionRegistedEnemyID
Returns an array with the Object ID of all enemies with a registered hitbox to player shots (via ObjEnemy_SetIntersectionCircleToShot()).
-
GetAllEnemyIntersectionPosition
Returns a 2D array with the position of all enemies for which collision detection is true (currently intersecting) ([index][<x-coordinate, y-coordinate>]).
-
-
GetEnemyIntersectionPositionByIdA1(int objIdEnemy)
Returns a 2D array with all collision detection positions of the specified enemy ([index][<x-coordinate, y-coordinate>]).
The first value (index 0) corresponds to the nearest position from the enemy (unsure).
-
-
LoadEnemyShotData(char[] path)
Loads specified shot image file.
Files with the same name can only be loaded once.
Missing explanation about calling the function several times (?)
ReloadEnemyShotData(char[] path)
Reloads specified shot image file (you can also (re)load a file that has not been loaded by LoadEnemyShotData).
Unlike LoadEnemyShotData, this function can load the same file several times.
Missing explanation about calling the function several times (?)
Shot
Create bullets, lasers or clear them from the screen among other things
-
DeleteShotAll(enum ShotTypes type, enum DeletionType deleteType)
Type:
- TYPE_ALL
- TYPE_SHOT
- TYPE_CHILD
Delete Type:
- TYPE_IMMEDIATE
- TYPE_FADE
- TYPE_ITEM
Deletes all shot objects on screen matching the criteria. TYPE_ALL will clear all shot objects, TYPE_SHOT will clear only shot objects without spell resistance, and TYPE_CHILD will clear shot objects fired from the currently running script ( e.g. a stage script that spawns enemies, putting CHILD in one of the enemy's script will clear only that enemy's bullets). The second type determines how the bullet will be deleted. TYPE_IMMEDIATE will immediately delete the bullets, TYPE_FADE will slowly fade out the bullets ( note, they will still be visible while fading out, but they will not have any collision), and TYPE_ITEM will turn the bullets into items according to the running item script.
-
-
CreateShotA1(double x, double y, double speed, double angle, int graphic, double delay)
Creates a basic bullet that will move in the angle and speed defined. Graphic is the image the bullet will have, while delay is the time in frames that the bullet will appear. During it's delay, there will be a cloud that appears where the bullet will spawn.
Refer to this bullet list for built in bullet id names.
Returns the created bullet's Object ID.
Also note that CreateShot functions will return a void value in a player script if the player is unable to shoot.
-
CreateShotA2(double x, double y, double speed, double angle, double acceleration, double maxSpeed, int graphic, double delay)
Same as CreateShotA1, except you can define an acceleration and max speed for the bullet. The number defined for acceleration will be applied to the bullet per frame, so this will usually have low numbers such as 0.1. Negative values may be used, however, having a negative value on acceleration but a positive number on max speed (or vice versa) will result in the bullet spawning at max speed.
Returns the created bullet's Object ID.
-
-
-
CreateShotB2(double x, double y, double xSpeed, double ySpeed, double xAcceleration, double yAcceleration, double xMaxSpeed, double yMaxSpeed, int graphic, double delay)
Same as CreateShotB1, except you can define separate x and y accelerations, and corresponding max/min speeds.
Returns the created bullet's Object ID.
-
-
-
-
CreateCurveLaserA1(double x, double y, double speed, double angle, double length, double width, double deleteTime, int graphic, double delay)
Creates a laser that functions similarly to CreateLooseLaserA1, but can be altered with ObjMove_SetAngularVelocity to create a curving laser.
This function is heavy to process, so having many of them on-screen is not recommended.
Returns the created laser's Object ID.
-
-
-
-
-
-
-
GetShotDataInfoA1(int graphic, enum TargetTypes target, enum InfoTypes infoType)
Returns either a value or an array of information depending on the request.
The target can be:
- TARGET_ENEMY
- TARGET_PLAYER
The infoType can be:
- INFO_RECT - Returns coordinate rect list array [left, top, right, bottom].
- INFO_DELAY_COLOR - Returns delay color RGB list [red, green, blue].
- INFO_BLEND - Returns nlending type (BLEND_ALPHA, BLEND_ADD_RGB, or BLEND_ADD_ARGB).
- INFO_COLLISION - Returns radius of collision detection.
- INFO_COLLISION_LIST - Returns 2D array of collision hitbox radii and coordinates. [index][radius, x, y]
-
Item
Create and collect pick up items
-
CreateItemA1(enum ItemTypes type, double x, double y, int score)
Type:
- ITEM_1UP(_S) - Extend
- ITEM_SPELL(_S) - Spell
- ITEM_POINT(_S) - Point
- ITEM_POWER(_S) - Power
- ITEM_USER - User-defined (add item constant to get desired item)
Creates an item at the specified points. The optional "_S" suffix will create a smaller version of the specified item.
"score" is the value the spawned item will add to your score.
-
CreateItemA2(enum ItemTypes type, double x, double y, double xDest, double yDest, int score)
Type:
- ITEM_1UP(_S) - Extend
- ITEM_SPELL(_S) - Spell
- ITEM_POINT(_S) - Point
- ITEM_POWER(_S) - Power
- ITEM_USER - User-defined (add item constant to get desired item)
Same as CreateItemA1, except now it will quickly move towards the specified coordinates (xDest, yDest) before slowly falling down. The optional "_S" suffix will create a smaller version of the specified item.
"score" is the value the spawned item will add to your score.
-
CreateItemU1(int userItemIdx, double x, double y, int score)
Creates an item much like CreateItemA1, however it will spawn a user-defined item associated with the specified ID. (Effectively automatically prefixes your item index with ITEM_USER)
"score" is the value the spawned item will add to your score.
-
-
-
CollectItemsByType(enum ItemTypes type)
Type:
- ITEM_1UP(_S) - Extend
- ITEM_SPELL(_S) - Spell
- ITEM_POINT(_S) - Point
- ITEM_POWER(_S) - Power
- ITEM_USER - User-defined (add item constant to get desired item)
Makes all items of the specified type fly toward the player.
-
CancelCollectItems()
Cancels any items that were currently moving to the player for collection. This only appears to work for items collected by the player auto item collection line (SetPlayerAutoItemCollectLine).
-
-
SetDefaultBonusItemEnable(bool isEnabled)
Sets whether or not to create the default autocollected bullet delete items when bullets are deleted to items. True will create the items, false will not. The default value is true.
-
LoadItemData(char[] path)
Loads the specified item data. Can be called any amount of times, but currently existing IDs will be replaced by new ones of the same value. You may not use the same file twice in this function; to do so, see ReloadItemData.
-
ReloadItemData(char[] path)
Reloads the specified item data. Can be called any amount of times, but currently existing IDs will be replaced by new ones of the same value. You do not need to use LoadItemData before using this function.
Other
Misc functions (Time Slow, Line-Circle and Object-Object collision tests, 2D position etc.)
-
StartSlow(enum SlowTargets target, int fps)
Target
Creates a pseudo slow effect by forcing Danmakufu to run at the specified FPS value. There is currently only one target available, TARGET_ALL. Use StopSlow to stop this effect.
-
-
-
-
-
-
-
concatenate(array arrayA, array arrayB)
Merges two arrays into one ( ~ symbol can also be used instead)
Example:
let array1 = [0, 0];
let array2 = [1, 1];
let array3 = concatenate(array1, array2); or let array3 = array1 ~ array2;
-
slice(array arrayA, int startIdx, int endIdx)
Cuts out a specific portion of an array.
Returns the indices in between the cutoff values (this includes the starting cutoff index but not the ending cutoff index).
array[starting..ending]; // .. operator can also be used.
Object
Base object functions all objects support
-
-
-
-
-
-
-
-
-
Obj_GetValue(int objId, char[] key)
Returns the value associated with the given key for the given object, previously set by Obj_SetValue.
Warning: If the key-value pair does not exist or was deleted, attempting to access it will crash the program.
-
-
-
-
-
Obj_GetType(int objId)
- OBJ_PRIMITIVE_2D - 2D Primitive
- OBJ_SPRITE_2D - 2D Sprite (Usable with ObjSprite2D_ functions)
- OBJ_SPRITE_LIST_2D - 2D Sprite List (Usable with ObjSpriteList2D_ functions)
- OBJ_PRIMITIVE_3D - 3D Primitive
- OBJ_SPRITE_3D - 3D Sprite (Usable with ObjSprite3D_ functions)
- OBJ_MESH - 3D Mesh (Usable with ObjMesh_ functions)
- OBJ_TEXT - Text Object (Usable with ObjText_ functions)
- OBJ_SOUND - Sound Object (Usable with ObjSound_ functions)
- OBJ_FILE_TEXT - Text File Object (Usable with ObjFileT_ functions)
- OBJ_FILE_BINARY - Binary File Object (Usable with ObjFileB_ functions)
- OBJ_PLAYER - Player (Usable with ObjPlayer_ functions)
- OBJ_SPELL - Spell (Usable with ObjSpell_ functions)
- OBJ_ENEMY - Enemy (Usable with ObjEnemy_ functions)
- OBJ_ENEMY_BOSS_SCENE - Enemy Boss Scene (Usable with ObjEnemyBossScene_ functions)
- OBJ_SHOT - Bullet (Usable with ObjShot_ functions)
- OBJ_LOOSE_LASER - Free laser (Usable with ObjLaser_ functions)
- OBJ_STRAIGHT_LASE - Long laser(Usable with ObjStLaser_ functions)
- OBJ_CURVE_LASER - Curved laser (Usable with ObjLaser_ functions)
- OBJ_ITEM - Item pickup (Usable with ObjItem_ functions)
Return to Home
|