Arts >> Magic >> Magic Tricks

Stop a Scratch Sprite at a Specific Y-Level: Conditional Loop Script

Use a conditional loop that checks the sprite's y-position and stops all scripts when the target is reached.

Example Script

when green flag clicked
forever
  move (10) steps
  if  ≥ (180) then
    stop [all v] scripts [in sprite v]
  end
end

Key Points

This halts the sprite instantly upon reaching the coordinate.

Magic Tricks

Related Categories