scrMakeOrbit

This script will set all the variables for scrOrbit to work

 Script

///scrMakeOrbit(id or -100,orbit_x,orbit_y,orbit_rad_dev,orbit_rad_min,orbit_rad_max,orbit_flux,orbit_flux_smth,orbit_speed,orbit_clockwise)

/* argument Information
orbit_obj [-100,id]
    This determines wether the objects will spin around a sepcific object, or at some point.
    id means type "id" into the argument. its used as a reference for that specific object.
orbit_x [double]
    The x posistion for orbiting. (won't matter if you have a specific object to orbit)
orbit_y [double]
    The y posistion for orbiting. (won't matter if you have a specific object to orbit)
orbit_rad_dev [double]
    The speed at which the orbiting objects will expand / contract.
orbit_rad_min [double]
    The minimum radius the orbiting objects can have.
orbit_rad_max [double]
    The maximum radius the orbiting objects can have.
orbit_flux [boolean]
    Whether or not the orbiting object's radius will fluctuate.
orbit_flux_smth [boolean]
    Whether or not the orbiting object's radius fluctuation will be smooth or not.
orbit_speed [double]
    The speed at which the orbiting objects rotate around the object or point.
orbit_clockwise [boolean]
    Does it rotate clockwise, or counter clockwise?
*/

//Apply values to variables within objCherry
speed = 0 // remove speed
orbit = true // enable orbit flag
// pass variables
orbit_obj_name = other.object_index;
orbit_obj = argument0;
orbit_x = argument1;
orbit_y = argument2;
orbit_rad_dev = argument3;
orbit_rad_min = argument4;
orbit_rad_max = argument5;
orbit_flux = argument6;
orbit_flux_smth = argument7;
orbit_sp = argument8;
orbit_clockwise = argument9;

// calculate ang and radius
if orbit_obj != -100 { 
    orbit_ang = point_direction(other.x,other.y,x,y)-180
    orbit_rad = distance_to_point(other.x,other.y)
} else { 
    orbit_ang = point_direction(orbit_x,orbit_y,x,y)
    orbit_rad = distance_to_point(orbit_x,orbit_y)
}
// check if increase or decrease
if orbit_rad > orbit_rad_max { 
    orbit_rad_inc = false 
} else { 
    orbit_rad_inc = true 
}