if (!active) exit; if (!scr_onscreen_tolerance(id, 100)) exit; timer++; if (strength > 1) strength = scr_movetowards(strength, 3, 0.2); ys = scr_platswap_yscale(); if (timer >= rate) { var _leaf = ((count % 2) == 0) ? instance_create(x, y + 40, obj_whirlwind_particle) : instance_create(x, y + 40, obj_cliff_crater_leaf); _leaf.siner = random(62.83185307179586); _leaf.lifetime = lifetime; _leaf.style = style; _leaf.owner = id; _leaf.downward = true; _leaf.depth = depth; timer = 0; if (count >= next_trail) { var _windtrail = instance_create(x, y, obj_cliff_crater_windtrail); wind_direction += (180 + irandom_range(-30, 30)); _windtrail.direction = wind_direction; _windtrail.owner = id; _windtrail.depth = depth; _windtrail.downward = true; if ((count % 2) == 0) count = -1; next_trail = count + 1 + irandom_range(10, 16); } count++; }