Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_guardener_verlet_vine_Step_0

(view raw script w/o annotations or w/e)
1
points[1][0] += ((cos(current_time / 1000)) * 0.1)
2
scr_verlet_updatepoints
scr_verlet_updatepoints

function scr_verlet_updatepoints(argument0, argument1, argument2) //gml_Script_scr_verlet_updatepoints { for (var i = 0; i < array_length(argument0); i++) { var p = array_get(argument0, i) if (!(array_get(p, 4))) { var vx = ((array_get(p, 0)) - (array_get(p, 2))) * argument1 var vy = ((array_get(p, 1)) - (array_get(p, 3))) * argument1 array_set(p, 2, array_get(p, 0)) array_set(p, 3, array_get(p, 1)) array_set(p, 0, ((array_get(p, 0)) + vx)) array_set(p, 1, ((array_get(p, 1)) + vy)) array_set(p, 1, ((array_get(p, 1)) + argument2)) } } }
(points, p_friction, p_gravity)
3
for (var i = 0; i < precision; i++)
4
{
5
    scr_verlet_updatesticks
scr_verlet_updatesticks

function scr_verlet_updatesticks(argument0) //gml_Script_scr_verlet_updatesticks { for (var i = 0; i < array_length(argument0); i++) { var s = array_get(argument0, i) var dx = (array_get(array_get(s, 1), 0)) - (array_get(array_get(s, 0), 0)) var dy = (array_get(array_get(s, 1), 1)) - (array_get(array_get(s, 0), 1)) var distance = sqrt(dx * dx + dy * dy) var difference = (array_get(s, 2)) - distance var percent = difference / distance / 2 var offsetX = dx * percent var offsetY = dy * percent if (!(array_get(array_get(s, 0), 4))) { array_set(array_get(s, 0), 0, ((array_get(array_get(s, 0), 0)) - offsetX)) array_set(array_get(s, 0), 1, ((array_get(array_get(s, 0), 1)) - offsetY)) } if (!(array_get(array_get(s, 1), 4))) { array_set(array_get(s, 1), 0, ((array_get(array_get(s, 1), 0)) + offsetX)) array_set(array_get(s, 1), 1, ((array_get(array_get(s, 1), 1)) + offsetY)) } } }
(sticks)
6
    scr_verlet_guardener_wind
scr_verlet_guardener_wind

function scr_verlet_guardener_wind(argument0) //gml_Script_scr_verlet_guardener_wind { for (var i = 0; i < array_length(argument0); i++) { var p = array_get(argument0, i) if (!(array_get(p, 4))) { if position_meeting(array_get(p, 0), array_get(p, 1), obj_guardener_verlet_wind) array_set(p, 0, ((array_get(p, 0)) - 0.025)) } } }
(points)
7
}