You are browsing as a guest. Sign up (or log in) to start making projects!

5h 27m 27s logged

Costumes + Sounds!

Finally, after a long time of putting this off, Katnip finally has syntax to import sounds and assets to use for your projects!

stage {
    costume "./sky.svg";

    events.onFlag() {
        looks.switchBackdrop("sky");
    }
}

sprite Cat {
    costume "./cat.svg" as idle;
    costume "./cat-blink.svg" as blink;
    sound "./meow.wav";

    events.onFlag() {
        motion.goTo(-100, 0);
        looks.switchCostume("idle");
        looks.say("costumes + sounds work", 2);
        forever {
            wait(0.5);
            looks.nextCostume();
        }
    }
}

Changelog

Compiler changes

  • Added costume and sound keywords
  • Added stage keyword for stage override (previously auto-gen’d)
  • Added forever keyword (cuz I forgot to add it somehow)

Website changes

  • Added upload icon for uploading files
  • Added support for the new costume and sound required fs callbacks
  • Added “rename” in dropdown right-click context

Notes

Not sure how the forever block and rename button took this long to add, both seem like something I could’ve adressed earlier, but—better late than never :P

0
7

Comments 0

No comments yet. Be the first!