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
costumeandsoundkeywords - Added
stagekeyword for stage override (previously auto-gen’d) - Added
foreverkeyword (cuz I forgot to add it somehow)
Website changes
- Added upload icon for uploading files
- Added support for the new
costumeandsoundrequired 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
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.