Variable counting another decreasing variable

I have one variable counting how many of a certain block is on screen with text attached to it that displays how many are there, and another variable that I need to count up one every time that the first variable only counts down.

I have a deadline for this on March 18, 1:30 PM PST
I’ve been working on this for two days now.

(Also sorry if this is a repost, I just created my account like 35 seconds ago to type this up real quick.)

So blocks_left is the count down value, and score is the count up value? If so, the following is what you’re after :

Yes this seems right, i’ll test it when I have the time and get back to you. Thanks for the help.

The code works fine for the most part, but I would like to have the ability to have the blocks regenerate on screen but have the score not reset every time they come back on screen. How would I go about this?

Then every time you generate a block, increase _blocks_left by 1.

Would I create a separate code block for this, or would I add it to the original code you sent?

Also, what would be the best possible way to have all the blocks regenerate in the spots they were originally?

This is my progress:

Add it as another action, in same event as where you set regen_block variable to false.

At the start of the scene, go through each obj_block (use a repeat for each object event) and store the co-ordinates in a structure.

Once there are no blocks left in the scene, loop through each element of the structure (use the for each child variable event), creating an obj_block at each stored position

Give it a go, and come back to the forums if you get stuck.

The two events you want are accessed either by clicking tthis icon imagein the top right of the editor, or by right clicking on “Add a new event” in the event sheet :