H
Harper
Guest
Hello all!
Say I have a range, from 115 to 200, and the values I am given on that range go up from 115 to 200 but I need to get them to go down from 200 to 115, how would I go about doing that?
Here's my actual code that I've been struggling with (line 4 is the number given that I want to inverse):
Say I have a range, from 115 to 200, and the values I am given on that range go up from 115 to 200 but I need to get them to go down from 200 to 115, how would I go about doing that?
Here's my actual code that I've been struggling with (line 4 is the number given that I want to inverse):
Code:
if(instance_exists(obj_ship)) {
if(collision_circle(x, y, gravity_radius, obj_ship, false, false)) {
obj_ship.planet_gravity = true;
draw_set_alpha(distance_to_object(obj_ship) / (gravity_radius - (sprite_width / 2)));
draw_circle_color(x, y, point_distance(x, y, obj_ship.x, obj_ship.y), c_aqua, c_aqua, true);
} else obj_ship.planet_gravity = false;
}