Art 412 Stephen Wilson Demo of an "urgency" game The user is challenged to drag several items to a box before an object falls to a certain spot on the screen The union function checks if one sprite is within another Union of 2 rects gives the smallest rect that will enclose them both If the union function returns the big rectangle (ho) then that means the little rectangle is inside of it Copy these scripts into exit frame script on exitFrame me h=sprite(5).locv h=h+1 sprite(5).locv=h checktoys end on checktoys toyflag = 0 b= sprite(2).rect bl= sprite(3).rect l= sprite(4).rect ho=sprite(1).rect if union (b, ho) = ho then toyflag = toyflag+1 if union (bl, ho) = ho then toyflag = toyflag+1 if union (l, ho) = ho then toyflag = toyflag+1 if toyflag = 3 then beep 6 -- put whatever you want here for winning end if if sprite(5).locV > 200 then --- the ball goes down beyond the end level beep 10 -- put whatever you want here for losing end if end