Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as JavaScript by Levente ( 9 years ago )
stage {
    scene White("gallery:Generic/White")
    let list = 0;
    let ind = 0;

    actor Robot {
        @bubblePosition(0.6, 0.6)
        costume Idle("gallery:Figures/Robot Idle")

        @editorPosition(10, 10)
        when stage.started {
        }

    }

    actor Cube {
        costume Cube_1("gallery:Objects/Cube 1")
        costume Cube_2("gallery:Objects/Cube 2")
        costume Cube_3("gallery:Objects/Cube 3")
        costume Cube_4("gallery:Objects/Cube 4")
        costume Cube_5("gallery:Objects/Cube 5")
        costume Cube_6("gallery:Objects/Cube 6")

        @editorPosition(13, 420)
        when stage.keyPressed("space") {
            this.setPosition(-250, 0);
            stage.clearPenTrails();
            this.show();
            list = [];
            for(let i = 1; i <= 6; i++) {
                for(let j = 1; j <= Math.randomBetween(10, 15); j++) {
                    this.turnRight(Math.randomBetween(-180, 180));
                    this.nextCostume();
                    this.wait(0.05);
                }
                list.push(this.costumeId);
                this.heading = 90;
                this.stampCostume();
                this.position.x += 100;
            }
            this.hide();
            if(CircleBox.costumeId == 1) {
            }
        }

        @editorPosition(38, 59)
        function IsThere6() {
            let found = false;
            let i = 0;
            while(!found && i < list.length) {
                if(list[1] == 6) {
                    found = true;
                }
                else {
                    i++;
                }
            }
            return found;
        }

        @editorPosition(100, 100)
        function FirstEven() {
            let found = false;
            ind = 0;
            while(!found && ind < list.length) {
                if(list[ind] % 2 == 0) {
                    found = true;
                }
                else {
                    ind++;
                }
            }
            return found;
        }

    }

    actor Pingvin {
        @bubblePosition(0.7, 0.4)
        costume Alap("gallery:Animals/Penguin Idle")
        @bubblePosition(0.7, 0.4)
        costume Fent("gallery:Animals/Penguin Up")
        @bubblePosition(0.7, 0.48)
        costume Lent("gallery:Animals/Penguin Down")

    }

}

 

Revise this Paste

Your Name: Code Language: