How to make a point counter system?

I want to make a point system(For example something that will count how many times that the player sprite has touched the coin sprite) but don't know how to make one. A little help?

Thanks,

Vanny

do you want it to be customised? :thinking:

Well, at this point I just need help on doing something that will count how many times that the player sprite has touched the coin sprite, I don't really need it to be customized.

[scratchblocks]
when <touching [coin v]> :: control hat //in the player sprite
change [points v] by (1)
wait until <not <touching [coin v]>>
[/scratchblocks]

How do you get the "points" option in the "Change ____ by __" block?

Make the variable!

I don't know how to make variables, or even other blocks.

How to make:

  • Variables
    • Global
      • Go to the Variables palette
      • Click Make a variable
      • Enter the name of the variable (e.g. points)
      • Click OK
    • Sprite-local
      • Go to the Variables palette
      • Click Make a variable
      • Enter the name of the variable (e.g. points)
      • Click for this sprite only
      • Click OK
    • Script-local
      • Go to the Variables palette
      • Drag a script variables block
      • Click the arrows to add or remove script variables
      • Click the variables at the top to change their names
      • Alternate method: create a block with an upvar (see below)
  • Blocks
    • Right-click the editor, then click make a block...
    • Or: go to any palette and click Make a block
    • Select which palette to put the block in
    • Type the text for the block labels
    • Select which type of block to make: Command, Reporter, or Predicate
    • To make it sprite-local, click for this sprite only
    • Drag blocks and attach them to the hat in the block editor to build the definition of the block
    • Use the plus signs in the block prototype in the hat to add text labels and inputs
    • Click an existing text label or input variable to change it
    • When making or editing an input, click the right-pointing-triangle to see a big menu of types
    • Right-click for more options
2 Likes

wow, you are a good teacher, very patient, you even taught him how to make a variable :+1:

1 Like

I am a "her" not a "him". I just decided to say this in case if you need that for later.

1 Like

I am so sorry for being rude, I don’t mean to do that :neutral_face:

What I do to avoid assuming genders is type "They" or "them" instead.

Its okay btw.

Btw you should read the snap manual :grin: it will help you learn Snap blocks

yeah, it's not like everybody can tell what gender someone is by looking at their username.

1 Like

I already learned, thanks to @snapenilk XD

1 Like

can you access the reference manual?

Yeah, I never really bothered reading it though because I code in Scratch and since Snap! is kinda like Scratch I thought I wouldn't need it. Pls don't hate me.

oh, don't worry, I never read it either. I do learn things quickly, but mostly from the forum (and me testing things out). There's helpful stuff in the manual.

1 Like

I read the first few pages, and then I was like "This is too long, my eyes hurt" so I stopped reading it. lol

I just don't like to read about how to code, I like figuring it out myself.

1 Like