new $group(number, specificopt)
- Description:
- Creates a group from a number
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
number |
number | Group ID | ||
specific |
boolean |
<optional> |
true
|
Whether to disallow G.js from using that specific group again |
Methods
alpha(opacity, duration)
- Description:
- Alpha trigger implementation
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
opacity |
number |
1
|
Changed opacity |
duration |
number |
0
|
How long it takes for the opacity to change |
animate(anim_idopt)
- Description:
- Animate trigger implementation
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
anim_id |
number |
<optional> |
0
|
Animation ID (can also use `animations.[monster].[animation name]`, check index module for more info about animation IDs) |
call(delay)
- Description:
- Calls the group
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
delay |
number |
0
|
How long to delay the group being called |
follow(other, x_mod, y_mod, duration)
- Description:
- Makes the group follow another
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
other |
group | Group to follow | |
x_mod |
number |
1
|
How much to speed up/slow down movement on X axis |
y_mod |
number |
1
|
How much to speed up/slow down movement on Y axis |
duration |
number |
999
|
How long to follow other group |
follow_lerp(groupA, groupB, weight, duration)
- Description:
- Keeps an object's position proportionally between 2 others
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
groupA |
group | Group of object A to follow | |
groupB |
group | Group of object B to follow | |
weight |
number |
0.5
|
How much of the way the group should be kept in |
duration |
number |
999
|
How long to follow |
follow_player_y(speedopt, delayopt, offsetopt, max_speedopt, durationopt)
- Description:
- Follows player Y
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
speed |
number |
<optional> |
0
|
How fast group snaps to player Y position |
delay |
number |
<optional> |
0
|
Delay of movement |
offset |
number |
<optional> |
0
|
Offset of group |
max_speed |
number |
<optional> |
0
|
How fast movement of group can be |
duration |
number |
<optional> |
0
|
How long the group is locked to player Y axis |
lock_to_player(lock_xopt, lock_yopt, durationopt)
- Description:
- Locks group to player
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
lock_x |
boolean |
<optional> |
true
|
Whether to lock to X axis of player |
lock_y |
boolean |
<optional> |
true
|
Whether to lock to Y axis of player |
duration |
number |
<optional> |
999
|
How long group is locked to player |
move(x, y, duration, easing, easing_rate, x_multiplier, y_multiplier, multiply)
- Description:
- Moves the group
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
x |
number | Movement on X axis | |
y |
number | Movement on Y axis | |
duration |
number |
0
|
Duration for move trigger |
easing |
easing | How smoothly object moves | |
easing_rate |
number |
2
|
Easing rate for move trigger |
x_multiplier |
number |
1
|
How much to multiply the amount by on X axis |
y_multiplier |
number |
1
|
How much to multiply the amount by on Y axis |
multiply |
boolean |
true
|
Whether to fit the amount of units moved into GD units (multiplying by 3 does this) * @param {boolean} silent Make move trigger take no time |
move_to(target, duration, x_only, y_only, easing, easing_rate)
- Description:
- Move target implementation
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
target |
group | Group to move to | |
duration |
number |
0
|
How long it takes to move to target |
x_only |
boolean |
false
|
Whether to only move on X axis |
y_only |
boolean |
false
|
Whether to only move on Y axis |
easing |
easing | Easing of movement | |
easing_rate |
number |
2
|
Easing rate of movement |
move_to_xy(x, y, durationopt, easingopt, easing_rateopt)
- Description:
- Moves group to specific coordinate
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number | X coordinate | ||
y |
number | Y coordinate | ||
duration |
number |
<optional> |
0
|
Duration of movement |
easing |
easing |
<optional> |
0
|
Easing of movement |
easing_rate |
number |
<optional> |
2
|
Easing rate of movement |
pause()
- Description:
- Pauses the current group
- Source:
pulse(color, fade_inopt, holdopt, fade_outopt, exclusiveopt)
- Description:
- Pulses group
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
array | RGB color to pulse | ||
fade_in |
number |
<optional> |
0
|
Fade in |
hold |
number |
<optional> |
0
|
Hold |
fade_out |
number |
<optional> |
0
|
Fade out |
exclusive |
number |
<optional> |
false
|
Whether to prioritize over simultaneous pulses |
pulse_hsv(h, s, b, s_checkedopt, b_checkedopt, fade_inopt, holdopt, fade_outopt, exclusiveopt)
- Description:
- Pulses group w/ HSV
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
h |
number | Hue | ||
s |
number | Saturation | ||
b |
number | Brightness | ||
s_checked |
boolean |
<optional> |
false
|
Saturation is checked |
b_checked |
boolean |
<optional> |
false
|
Brightness is checked |
fade_in |
number |
<optional> |
0
|
Fade in |
hold |
number |
<optional> |
0
|
Hold |
fade_out |
number |
<optional> |
0
|
Fade out |
exclusive |
number |
<optional> |
false
|
Whether to prioritize over simultaneous pulses |
remap(…remaps)
- Description:
- Remaps multiple IDs inside of the group to others
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
remaps |
array |
<repeatable> |
Array of groups to remap, e.g. remap([group(1), group(2)], [group(4), group(3)]) is valid |
resume()
- Description:
- Resumes the current group
- Source:
rotate(center, degrees, durationopt, easingopt, easing_rateopt, lock_object_rotationopt)
- Description:
- Rotates the group
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
center |
group | Group to rotate around | ||
degrees |
number | How many degrees to rotate | ||
duration |
number |
<optional> |
0
|
How long it takes for the group to rotate |
easing |
easing |
<optional> |
NONE
|
How smoothly the object rotates |
easing_rate |
number |
<optional> |
2
|
Easing rate of rotation |
lock_object_rotation |
boolean |
<optional> |
false
|
Whether to turn on "lock object rotation" |
scale(center, scale_x, scale_y, durationopt, easingopt, easing_rateopt, x_divideopt, y_divideopt, move_onlyopt, relative_scaleopt, relative_rotopt)
- Description:
- Scales the group
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
center |
group | Center of group for scaling | ||
scale_x |
number | Scaling on X axis | ||
scale_y |
number | Scaling on Y axis | ||
duration |
number |
<optional> |
0
|
Duration for scale trigger |
easing |
easing |
<optional> |
NONE
|
How smoothly object gets scaled |
easing_rate |
number |
<optional> |
2
|
Easing rate for scale trigger |
x_divide |
boolean |
<optional> |
false
|
Whether to divide the current scaling by scale_x |
y_divide |
boolean |
<optional> |
false
|
Whether to divide the current scaling by scale_y |
move_only |
boolean |
<optional> |
false
|
Whether to emulate the effect of scaling without actually scaling the group by moving the group instead |
relative_scale |
boolean |
<optional> |
false
|
Bases scaling on the reference object |
relative_rot |
boolean |
<optional> |
false
|
Whether to rotate the X and Y axis |
stop()
- Description:
- Stops the current group
- Source:
toggle_off()
- Description:
- Toggles the group off
- Source:
toggle_on()
- Description:
- Toggles the group on
- Source: