let CSD = GetCurrentScriptDirectory;

let MinX=32;
let MaxX=380;
let MinY=0;
let MaxY=464;
let GetCenterX = GetStgFrameWidth/2;
let GetCenterY = GetStgFrameHeight/2;

function wait(w) { loop(w) { yield; } } 

function Distance(x1, y1, x2, y2){
	return ((x1-x2)^2 + (y1-y2)^2)^0.5;
}

function SetScore(let v) { if(GetEventType == EV_REQUEST_SPELL_SCORE) { SetScriptResult(v); } }
function SetLife(let v) { if(GetEventType == EV_REQUEST_LIFE) { SetScriptResult(v); } }
function SetTimer(let v) { if(GetEventType == EV_REQUEST_TIMER) { SetScriptResult(v); } }
function GetAngleTo(let object1, let object2) { return atan2(ObjMove_GetY(object2)-ObjMove_GetY(object1), ObjMove_GetX(object2)-ObjMove_GetX(object1));}
