Advertisement
theusaf

Updated: Code for Scratch Emulator

Jun 24th, 2016
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. {"objName":"Stage", "children": [{"objName":"project" ,"variables":[ {"name": "genClones" , "value": "5" , "isPersistent":false} , {"name": "123" , "value": "5" , "isPersistent":false} , {"name": "holdingClone" , "value": "1" , "isPersistent":false} , {"name": "distance to" , "value": "0" , "isPersistent":false} , {"name": "1234" , "value": "6" , "isPersistent":false} ] ,"scripts":[ [ 34 , -594 , [ ["whenGreenFlag" ] , ["clearPenTrails" ] , ["setVar:to:" , "genClones" , "0" ] , ["say:duration:elapsed:from:" , "This is a clone generator. Use mouse to move them around~" , "5" ] , ["hide" ] , ["doAsk" , "How many clones would you like to make? (Up to infinity)" ] , ["setVar:to:" , "genClones" , ["answer" ] ] , ["deleteLine:ofList:" , "all" , "y" ] , ["deleteLine:ofList:" , "all" , "x" ] , ["doBroadcastAndWait" , "create clone" ] , ["broadcast:" , "draw the clones" ] ]] , [ 33 , -622 , [ ["forward:" , "this is a project with clones by theusaf..." ] ]] , [ 32 , -330 , [ ["whenIReceive" , "draw the clones" ] , ["clearPenTrails" ] , ["setVar:to:" , "1234" , "1" ] , ["warpSpeed" ,[ ["doUntil" , ["=" , ["getLine:ofList:" , ["readVariable" , "1234" ] , "y" ] , "" ] ,[ ["putPenUp" ] , ["penSize:" , "30" ] , ["penColor:" , "0x0000ff" ] , ["changePenHueBy:" , "0" ] , ["gotoX:y:" , ["getLine:ofList:" , ["readVariable" , "1234" ] , "x" ] , ["getLine:ofList:" , ["readVariable" , "1234" ] , "y" ] ] , ["putPenDown" ] , ["changeVar:by:" , "1234" , "1" ] ] ] ] ] ]] , [ 33 , -106 , [ ["whenGreenFlag" ] , ["setVar:to:" , "genClones" , "0" ] , ["doForever" ,[ ["setVar:to:" , "holdingClone" , "0" ] , ["warpSpeed" ,[ ["doIf" , ["mousePressed" ] ,[ ["setVar:to:" , "123" , "1" ] , ["doUntil" , ["=" , ["getLine:ofList:" , ["readVariable" , "123" ] , "y" ] , "" ] ,[ ["doIf" , ["=" , ["readVariable" , "holdingClone" ] , "0" ] ,[ ["setVar:to:" , "distance to" , ["computeFunction:of:" , "sqrt" , ["+" , ["*" , ["-" , ["getLine:ofList:" , ["readVariable" , "123" ] , "x" ] , ["mouseX" ] ] , ["-" , ["getLine:ofList:" , ["readVariable" , "123" ] , "x" ] , ["mouseX" ] ] ] , ["*" , ["-" , ["getLine:ofList:" , ["readVariable" , "123" ] , "y" ] , ["mouseY" ] ] , ["-" , ["getLine:ofList:" , ["readVariable" , "123" ] , "y" ] , ["mouseY" ] ] ] ] ] ] , ["doIf" , ["<" , ["readVariable" , "distance to" ] , "20" ] ,[ ["setVar:to:" , "holdingClone" , "1" ] , ["doUntil" , ["=" , ["mousePressed" ] , "false" ] ,[ ["setLine:ofList:to:" , ["readVariable" , "123" ] , "y" , ["mouseY" ] ] , ["setLine:ofList:to:" , ["readVariable" , "123" ] , "x" , ["mouseX" ] ] , ["doBroadcastAndWait" , "draw the clones" ] ] ] , ["setVar:to:" , "holdingClone" , "0" ] , ["setVar:to:" , "123" , "345346563632" ] ] ] , ["changeVar:by:" , "123" , "1" ] ] ] ] ] ] ] ] ] ] ] ]] , [ 200 , -410 , [ ["whenIReceive" , "create clone" ] , ["doRepeat" , ["readVariable" , "genClones" ] ,[ ["append:toList:" , ["randomFrom:to:" , "-180" , "180" ] , "y" ] , ["append:toList:" , ["randomFrom:to:" , "-240" , "240" ] , "x" ] ] ] ]] ] }],"info":{} }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement