Script function checkrange to check if a target is in range.
Add a updated script and also a level updated script, just because update script is executed before update so some draw functions can't work correctly since the screen might be scrolled after that.