I have a variable inside an object being created via a with statement, and that variable is being set with another variable inside the object calling the with statement but gamemaker thinks both variables are coming from the created object?? I'm not entirely sure how to explain it but it's really freakin weird imo
scale = global.scale_minmax;
distance_to_judgement_line = distance_to_point(global.track1, calc_scale_y(scale, 4.65))
// Telegraph Time
telegraphed_time = 0.5;
// Calculate time to next marker
beat_duration = global.interval_duration_ms;
time_to_next_beat = (current_time / beat_duration + 1) * beat_duration - current_time;
// Adjust falling speed accordingly
time_diff = telegraphed_time - time_to_next_beat;
if time_diff > 0
{
falling_speed = distance_to_judgement_line / time_diff;
} else
{
falling_speed = distance_to_judgement_line / beat_duration;
}
inst_layer = layer_get_id("Instances");
// --- THE IMPORTANT LINE IS BELOW ---
with instance_create_layer(global.track1, calc_scale_y(scale, -0.5), inst_layer, obj_note)
{
fall_speed = falling_speed;
}