Discuss Scratch

athenabjorg
Scratcher
3 posts

Difficulty making levels

Is anyone here good at making levels in scratch?
I have been going at this for hours but nothing works, so i would really appreciate a second pair of eyes here.

https://scratch.mit.edu/projects/112587535/#editor

The “When i receive lvlup” is activated, but it doesn't activate the “When i start as a clone” commands. The “when i start as a clone” commands work though, they give the right result if i input a different lvl from the start.
Maybe it has to do with that when i had the lvl increase by 1 it actually increased it by 10. So i had to set it to increase by 0.1… ??

Last edited by athenabjorg (July 24, 2016 13:47:17)

deck26
Scratcher
1000+ posts

Difficulty making levels

It's very hard to help based on images of scripts - much better to share the project.
athenabjorg
Scratcher
3 posts

Difficulty making levels

Phantom38
Scratcher
42 posts

Difficulty making levels

From what I understand in your code, I don't think the variable
 (lvl)
is ever is equal to 2. And thus, does not create clones. but I may be wrong.

Last edited by Phantom38 (July 24, 2016 13:56:55)

deck26
Scratcher
1000+ posts

Difficulty making levels

athenabjorg wrote:

There is a link the also https://scratch.mit.edu/projects/112587535/#editor
So you did - my apologies.

Where does lvl get changed?

athenabjorg
Scratcher
3 posts

Difficulty making levels

Phantom38 wrote:

From what I understand in your code, I don't think the variable
 (lvl)
is ever is equal to 2. And thus, does not create clones. but I may be wrong.

Yea, that's what i'm thinking. But i don't know how to fix that and don't understand why


Phantom38 wrote:

Where does lvl get changed?


At the
when [ space] key pressed
script.
(hits)
is how many bricks need to be hit before the level is over, and each time a brick is hit it counts down 1. (I've put the hits for lvl 1 at only 2 hits so testing is quicker )
deck26
Scratcher
1000+ posts

Difficulty making levels

I'd have thought that lvlup should start with a block changing lvl by 1 so it works for different levels. Not sure why you have the forever loop in lvlup.

It does seem to work for lvl=2 now though.

Powered by DjangoBB