hmnwilson wrote:
I played it and it seemed to work OK. what are the problems you were talking about?
well, the levels get all mixed up. it'll skip sometimes. also, when you start things that happen later on in the game might will happen when you start.
Offline
Hi andy321! You'll be pleased to know that I downloaded your project and that I know how to solve your problems.
There are 2 problems with your project. The first problem is the one you mentioned about that when you have started something that's meant to happen later on in the game, when you start again, they happen at the beginning. This is because you need to add a script that resets the level to 1 every time you press the green flag. All you need to do is add this script anywhere in your project:
[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ level }to( 1[/blocks]
and your first problem will be fixed.
The second problem I noticed was that after you defeat the gremlin, the god congratulates you, but he keeps saying the same thing over and over again, and because of this you can't carry on with the game. This is because you added a forever block to your script:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if>[/blocks][blocks][blocks]<( [blocks]<{ level }>[/blocks] <=> 10 )>[/blocks]
[blocks]<say[ Well done! You've defeated the gremlin. ]for( 2 )secs>[/blocks]
[blocks]<end>[/blocks]
There is a difference between putting a "forever if" block, and a "forever" block and then and "if" block. When you put a "forever if" block into your project, the block keeps checking to see if the script is true or not until the project stops playing. However, if you put "forever" and then "if", and then the script you want it to perform, although the script still keeps checking if it is true, when it is true, it will repeat the script inside the "if" block because the "if" block is surrounded by a "forever" block, because whatever is inside a forever block will keep repeating until the project stops playing. So just trash the "forever" and "if" blocks from that script and replace them with a "forever if" block.
Hope this helps! If you don't understand, just post a comment in my topic, "Anyone Need Any Help?" in the All About Scratch section of the forums.
Happy Scratch-ing!
Offline
pokemon_master12 wrote:
Hi andy321! You'll be pleased to know that I downloaded your project and that I know how to solve your problems.
There are 2 problems with your project. The first problem is the one you mentioned about that when you have started something that's meant to happen later on in the game, when you start again, they happen at the beginning. This is because you need to add a script that resets the level to 1 every time you press the green flag. All you need to do is add this script anywhere in your project:
[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ level }to( 1[/blocks]
and your first problem will be fixed.
The second problem I noticed was that after you defeat the gremlin, the god congratulates you, but he keeps saying the same thing over and over again, and because of this you can't carry on with the game. This is because you added a forever block to your script:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if>[/blocks][blocks][blocks]<( [blocks]<{ level }>[/blocks] <=> 10 )>[/blocks]
[blocks]<say[ Well done! You've defeated the gremlin. ]for( 2 )secs>[/blocks]
[blocks]<end>[/blocks]
There is a difference between putting a "forever if" block, and a "forever" block and then and "if" block. When you put a "forever if" block into your project, the block keeps checking to see if the script is true or not until the project stops playing. However, if you put "forever" and then "if", and then the script you want it to perform, although the script still keeps checking if it is true, when it is true, it will repeat the script inside the "if" block because the "if" block is surrounded by a "forever" block, because whatever is inside a forever block will keep repeating until the project stops playing. So just trash the "forever" and "if" blocks from that script and replace them with a "forever if" block.
Hope this helps! If you don't understand, just post a comment in my topic, "Anyone Need Any Help?" in the All About Scratch section of the forums.
Happy Scratch-ing!![]()
okay, i forgot to set the level to 1 when i clicked the flag. and also, when i played it, i skipped the fight with the gremlin. did that happen for you? or might that have something to do with the "forever" then "if" script?
Offline
No, it's ok, I fought the gremlin, it's just that when I finished the fight it kept repeating the bit where it says: "Well done, you have defeated the gremlin!"over and over. That is to do with the "forever" then "if" script, as explained in my first comment.
Offline
pokemon_master12 wrote:
There is a difference between putting a "forever if" block, and a "forever" block and then and "if" block. When you put a "forever if" block into your project, the block keeps checking to see if the script is true or not until the project stops playing. However, if you put "forever" and then "if", and then the script you want it to perform, although the script still keeps checking if it is true, when it is true, it will repeat the script inside the "if" block because the "if" block is surrounded by a "forever" block, because whatever is inside a forever block will keep repeating until the project stops playing. So just trash the "forever" and "if" blocks from that script and replace them with a "forever if" block.
I am going to download it and fix it, upload it back again. I'll link to it
Offline
pokemon_master12 wrote:
Hi andy321! You'll be pleased to know that I downloaded your project and that I know how to solve your problems.
There are 2 problems with your project. The first problem is the one you mentioned about that when you have started something that's meant to happen later on in the game, when you start again, they happen at the beginning. This is because you need to add a script that resets the level to 1 every time you press the green flag. All you need to do is add this script anywhere in your project:
[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ level }to( 1[/blocks]
and your first problem will be fixed.
The second problem I noticed was that after you defeat the gremlin, the god congratulates you, but he keeps saying the same thing over and over again, and because of this you can't carry on with the game. This is because you added a forever block to your script:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if>[/blocks][blocks][blocks]<( [blocks]<{ level }>[/blocks] <=> 10 )>[/blocks]
[blocks]<say[ Well done! You've defeated the gremlin. ]for( 2 )secs>[/blocks]
[blocks]<end>[/blocks]
There is a difference between putting a "forever if" block, and a "forever" block and then and "if" block. When you put a "forever if" block into your project, the block keeps checking to see if the script is true or not until the project stops playing. However, if you put "forever" and then "if", and then the script you want it to perform, although the script still keeps checking if it is true, when it is true, it will repeat the script inside the "if" block because the "if" block is surrounded by a "forever" block, because whatever is inside a forever block will keep repeating until the project stops playing. So just trash the "forever" and "if" blocks from that script and replace them with a "forever if" block.
Hope this helps! If you don't understand, just post a comment in my topic, "Anyone Need Any Help?" in the All About Scratch section of the forums.
Happy Scratch-ing!![]()
I don't think the forever if block works, why not when green flag click, wait until level=10, say.....
Offline