Hi there! Is it possible to create a simple custom score using the arcade text extension?
This is the thing that i’m working on. I’d like to make it so that the coin counter in the picture goes up once you kill an enemy.
can you send a link them I could help
Okay! Here it is…
thanks
Something like this should work.
Hope this helps.
It did actually help! I simply made it so that the monkey would drop a coin when killed and added that code when the player touched the coin. Thanks a bunch!
so you just need to put the change score block
yeah i did the same thing
but I also made it so it updates
Another question I’d like to ask (that doesn’t nessecarily relate to the text extension…)
Is it possible to save the amount of coins that the player has after destroying monkeys?
I’m asking because I plan to add more weapons to this game, so I’ll add a shop where you could spend coins for different weapons. There’s no point in buying a weapon when you reset the game and everything is gone, right?
The settings extention saves a number or a string, so when you come back, it is still what is was when you left.
I Have also put in saving for your coins
Sorry, could you put that code back in for the current link? The project you have is outdated, and I’d like to put the code back into the current version, since when I try to do that, it doesn’t work.
ok will do
here it is and if you press the menu there will be an option to reset your coins:
Built-in menu options??? How? (I did sneak a peek at the code to figure out how.) It seems to be an extension! Can you send me the extension download link when you have the time?
well @meeeeeeeep1 has created this extension but here the link Custom Menu Showcase
and I can teach you how
-
go to javascript
-
click on explorer under the simulator
-
click on the plus symbol next to the explorer
-
click the ok button but don’t change the name
-
delete all the code in the file and paste in this:
//% color=“#e6ac00” icon=“” block=“Menu”
namespace menu {//% block=“Add system menu option $name icon $image function:”
//% handlerStatement=1
//% image.shadow=screen_image_picker
export function addmenuoption(name: string, image: Image, handler: () => void): void {
scene.systemMenu.addEntry(() => name, handler, image);}
}
then click back to blocks
Wow, thanks! This is better than my custom-made pause menu.
Hey there again! I’m sorry I keep asking so many of these, but this will hopefully be the last question I ask: Would it be possible to create a menu using the arcade-menu extension?
For some reason, whenever I try to do this myself, the game crashes due to a “reading width” error.
Here’s the current code: https://makecode.com/_Rtm977MeiF0b
Additionally, I’ve added a new gun; the Freeze Ray. Thanks for playing the game & answering my questions
I’ve fixed the error you had.