Requires
Classes
Namespaces
Members
(inner) animations :animations
- Description:
- Object containing various animation IDs for big beast, bat, and spikeball.
- Source:
Object containing various animation IDs for big beast, bat, and spikeball.
Type:
- animations
(inner) obj_ids :obj_ids
- Description:
- Object containing various IDs for objects, triggers, and portals.
- Source:
Object containing various IDs for objects, triggers, and portals.
Type:
- obj_ids
Methods
(inner) exportConfig(conf) → {null|string}
Parameters:
Name | Type | Description |
---|---|---|
conf |
export_config | Configuration for exporting level |
Returns:
Levelstring if using "levelstring" type, otherwise null
- Type
- null | string
(inner) extract(dict)
Parameters:
Name | Type | Description |
---|---|---|
dict |
dictionary | Dictionary to extract |
(inner) ignore_context_change(fn)
Parameters:
Name | Type | Description |
---|---|---|
fn |
function | Function containing code where context changes should be ignored |
(inner) object(dict) → {object}
- Description:
- Takes a dictionary with object props & converts into an object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
dict |
dictionary | Dictionary to convert to object |
Returns:
- Type
- object
(inner) range(start, end, step) → {array}
- Description:
- Generates an array holding a sequence of numbers starting at the "start" parameter, ending at the "end" parameter and incrementing by "step"
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
start |
number | What number to start at | |
end |
number | What number to end at | |
step |
number |
1
|
What number to increment by |
Returns:
Resulting sequence
- Type
- array
(inner) trigger_function(callback) → {group}
- Description:
- Creates a "trigger function" in which triggers can be stored inside of a single group
- Source:
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Function storing triggers to put inside of group |
Returns:
Group ID of trigger function
- Type
- group
(inner) unknown_b() → {block}
Returns:
Resulting block ID
- Type
- block
(inner) unknown_c() → {color}
Returns:
Resulting color ID
- Type
- color
(inner) unknown_g() → {group}
Returns:
Resulting group ID
- Type
- group
(inner) wait(time)
Parameters:
Name | Type | Description |
---|---|---|
time |
number | How long to wait |
(inner) while_loop(condition, func, delay)
- Description:
- Creates a repeating trigger system that repeats while a condition is true
- Source:
Parameters:
Name | Type | Description |
---|---|---|
condition |
condition | Condition that defines whether the loop should keep on running (less_than/equal_to/greater_than(counter, number)) |
func |
function | Function to run while the condition is true |
delay |
number | Delay between each cycle |
Type Definitions
animations
Properties:
Name | Type | Description |
---|---|---|
big_beast |
big_beast_animations | Animation identifiers for big beast |
bat |
bat_animations | Animation identifiers for bat |
spikeball |
spikeball_animations | Animation identifiers for spikeball |
Type:
- Object
bat_animations
Properties:
Name | Type | Description |
---|---|---|
idle01 |
number | Identifier for the first idle animation |
idle02 |
number | Identifier for the second idle animation |
idle03 |
number | Identifier for the third idle animation |
attack01 |
number | Identifier for the first attack animation |
attack02 |
number | Identifier for the second attack animation |
attack02_end |
number | Identifier for the end of the second attack animation |
sleep |
number | Identifier for the sleep animation |
sleep_loop |
number | Identifier for the sleep loop animation |
sleep_end |
number | Identifier for the end of the sleep animation |
attack02_loop |
number | Identifier for the loop of the second attack animation |
Type:
- Object
big_beast_animations
Properties:
Name | Type | Description |
---|---|---|
bite |
number | Identifier for the bite animation |
attack01 |
number | Identifier for the first attack animation |
attack01_end |
number | Identifier for the end of the first attack animation |
idle01 |
number | Identifier for the first idle animation |
Type:
- Object
context
Properties:
Name | Type | Description |
---|---|---|
name |
string | Name of the current context |
group |
group | Group representing the current context |
objects |
array | All objects in the current context |
children |
array | Child contexts |
Type:
- object
easing
Properties:
Name | Type | Description |
---|---|---|
EASE_IN_OUT |
number | Ease in out easing |
EASE_IN |
number | Ease in easing |
EASE_OUT |
number | Ease out easing |
EXPONENTIAL_IN_OUT |
number | Exponential in out easing |
EXPONENTIAL_IN |
number | Exponential in easing |
EXPONENTIAL_OUT |
number | Exponential out easing |
SINE_IN_OUT |
number | Sine in out easing |
SINE_IN |
number | Sine in easing |
SINE_OUT |
number | Sine out easing |
ELASTIC_IN_OUT |
number | Elastic in out easing |
ELASTIC_IN |
number | Elastic in easing |
ELASTIC_OUT |
number | Elastic out easing |
BACK_IN_OUT |
number | Back in out easing |
BACK_IN |
number | Back in easing |
BACK_OUT |
number | Back out easing |
BOUNCE_IN_OUT |
number | Bounce in out easing |
BOUNCE_IN |
number | Bounce in easing |
BOUNCE_OUT |
number | Bounce out easing |
Type:
- object
export_config
Properties:
Name | Type | Description |
---|---|---|
type |
string | Type of export (can be "levelstring", "savefile" or "live_editor") |
options |
save_config | Configuration for specific export type |
Type:
- Object
obj_ids
Properties:
Name | Type | Description |
---|---|---|
special |
special_objects | Special object IDs |
triggers |
trigger_ids | Trigger object IDs |
portals |
portal_ids | Portal object IDs |
Type:
- Object
object
Properties:
Name | Type | Description |
---|---|---|
type |
string | String dictating that the type of the resulting dictionary is an object |
obj_props |
dictionary | Dictionary inside of object holding the actual object properties of the object |
with |
function | Modifies/adds an object property (e.g. `object.with(obj_props.X, 15)`) |
add |
function | Adds the object |
Type:
- dictionary
portal_ids
Properties:
Name | Type | Description |
---|---|---|
SPEED_GREEN |
number | Identifier for green speed portal |
TELEPORT |
number | Identifier for teleport portal |
CUBE |
number | Identifier for cube portal |
MIRROR_OFF |
number | Identifier for mirror off portal |
WAVE |
number | Identifier for wave portal |
SPIDER |
number | Identifier for spider portal |
SPEED_RED |
number | Identifier for red speed portal |
GRAVITY_DOWN |
number | Identifier for gravity down portal |
SPEED_BLUE |
number | Identifier for blue speed portal |
UFO |
number | Identifier for UFO portal |
ROBOT |
number | Identifier for robot portal |
MIRROR_ON |
number | Identifier for mirror on portal |
GRAVITY_UP |
number | Identifier for gravity up portal |
DUAL_ON |
number | Identifier for dual on portal |
SIZE_MINI |
number | Identifier for mini size portal |
BALL |
number | Identifier for ball portal |
SIZE_NORMAL |
number | Identifier for normal size portal |
SHIP |
number | Identifier for ship portal |
SPEED_PINK |
number | Identifier for pink speed portal |
SPEED_YELLOW |
number | Identifier for yellow speed portal |
DUAL_OFF |
number | Identifier for dual off portal |
Type:
- Object
save_config
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
info |
boolean |
<optional> |
false
|
Whether to log information to console when finished |
group_count_warning |
boolean |
<optional> |
true
|
Whether to warn that group count is surpassed (only useful if in future updates the group count is increased) |
level_name |
string |
<optional> |
by default, it writes to your most recent level/topmost level
|
Name of level (only for exportToSavefile) |
path |
string |
<optional> |
path to savefile automatically detected based off of OS
|
Path to CCLocalLevels.dat savefile (only for exportToSavefile) |
reencrypt |
boolean |
<optional> |
true
|
Whether to reencrypt savefile after editing it, or to let GD encrypt it |
optimize |
boolean |
<optional> |
true
|
Whether to optimize unused groups & triggers that point to unused groups |
replacePastObjects |
boolean |
<optional> |
true
|
Whether to delete all objects added by G.js in the past & replace them with the new objects |
removeGroup |
number | group |
<optional> |
9999
|
Group to use to mark objects to be automatically deleted when re-running the script (default is 9999) |
Configuration for exporting levels.
Type:
- object
special_objects
Properties:
Name | Type | Description |
---|---|---|
USER_COIN |
number | Identifier for user coin |
H_BLOCK |
number | Identifier for H block |
J_BLOCK |
number | Identifier for J block |
TEXT |
number | Identifier for text |
S_BLOCK |
number | Identifier for S block |
ITEM_DISPLAY |
number | Identifier for item display |
D_BLOCK |
number | Identifier for D block |
COLLISION_BLOCK |
number | Identifier for collision block |
Type:
- Object
spikeball_animations
Properties:
Name | Type | Description |
---|---|---|
idle01 |
number | Identifier for the first idle animation |
idle02 |
number | Identifier for the second idle animation |
toAttack01 |
number | Identifier for the transition to the first attack animation |
attack01 |
number | Identifier for the first attack animation |
attack02 |
number | Identifier for the second attack animation |
toAttack03 |
number | Identifier for the transition to the third attack animation |
attack03 |
number | Identifier for the third attack animation |
idle03 |
number | Identifier for the third idle animation |
fromAttack03 |
number | Identifier for the transition from the third attack animation |
Type:
- Object
trigger_ids
Properties:
Name | Type | Description |
---|---|---|
SPAWN |
number | Identifier for spawn trigger |
ON_DEATH |
number | Identifier for on-death trigger |
ROTATE |
number | Identifier for rotate trigger |
COUNT |
number | Identifier for count trigger |
DISABLE_TRAIL |
number | Identifier for disable trail trigger |
HIDE |
number | Identifier for hide trigger |
PICKUP |
number | Identifier for pickup trigger |
COLLISION |
number | Identifier for collision trigger |
ENABLE_TRAIL |
number | Identifier for enable trail trigger |
ANIMATE |
number | Identifier for animate trigger |
TOUCH |
number | Identifier for touch trigger |
INSTANT_COUNT |
number | Identifier for instant count trigger |
BG_EFFECT_OFF |
number | Identifier for BG effect off trigger |
TOGGLE |
number | Identifier for toggle trigger |
MOVE |
number | Identifier for move trigger |
ALPHA |
number | Identifier for alpha trigger |
SHOW |
number | Identifier for show trigger |
STOP |
number | Identifier for stop trigger |
FOLLOW |
number | Identifier for follow trigger |
PULSE |
number | Identifier for pulse trigger |
BG_EFFECT_ON |
number | Identifier for BG effect on trigger |
SHAKE |
number | Identifier for shake trigger |
FOLLOW_PLAYER_Y |
number | Identifier for follow player Y trigger |
COLOR |
number | Identifier for color trigger |
Type:
- Object