Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Making sprite show after every ten seconds
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
This certain sprite will show and move every ten seconds then stop and repeat itself after another ten seconds. I've been trying to code this bit but when I try to use “wait 10 secs”, it just slows down my sprites movement. Here is my code:
Thank you
Thank you
- 14152cool
-
100+ posts
Making sprite show after every ten seconds
I think this is what you want: This certain sprite will show and move every ten seconds then stop and repeat itself after another ten seconds. I've been trying to code this bit but when I try to use “wait 10 secs”, it just slows down my sprites movement.
- Kraken_Games
-
100+ posts
Making sprite show after every ten seconds
Put the wait inside of the if, before the show.
And after the else, put a hide.
As a general rule, putting waits inside of forevers when they're not inside of ifs of elses will slow the entire script down, making the if only check once after it waits, then wait until the wait is done.
And after the else, put a hide.
As a general rule, putting waits inside of forevers when they're not inside of ifs of elses will slow the entire script down, making the if only check once after it waits, then wait until the wait is done.
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
I have tried this code but it still doesn't work
I think this is what you want: This certain sprite will show and move every ten seconds then stop and repeat itself after another ten seconds. I've been trying to code this bit but when I try to use “wait 10 secs”, it just slows down my sprites movement.
- deck26
-
1000+ posts
Making sprite show after every ten seconds
You need to share the project so we can see why it didn't work.
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
if, before the show.Put the wait inside of the
And after the else, put a hide.
As a general rule, putting waits inside of forevers when they're not inside of ifs of elses will slow the entire script down, making the if only check once after it waits, then wait until the wait is done.
I have tried this but it still doesn't work
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
You need to share the project so we can see why it didn't work.https://scratch.mit.edu/projects/304212603/
Here it is. It's not finished yet so it may take a couple of retries to get it going. If you spot any problems with the coding or with anything that might need fixing, please let me know. Also, the part where the code is, is in the sprite called “Snitch”
Last edited by Expelliarmus11 (April 23, 2019 17:26:20)
- deck26
-
1000+ posts
Making sprite show after every ten seconds
So when is it told to hide? Does it only do so once per level up?
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
The snitch will appear on level 2 and will hide once level 3 starts(hasn't been coded yet). The main character will have to capture it to get to the next level. Therefore, it will appear every ten seconds to allow the player to have a chance to get it.
- deck26
-
1000+ posts
Making sprite show after every ten seconds
But I don't see where you tell it to hide - it appears 10 seconds after the level up but you don't then tell it to hide do you? The snitch will appear on level 2 and will hide once level 3 starts(hasn't been coded yet). The main character will have to capture it to get to the next level. Therefore, it will appear every ten seconds to allow the player to have a chance to get it.
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
But I don't see where you tell it to hide - it appears 10 seconds after the level up but you don't then tell it to hide do you? The snitch will appear on level 2 and will hide once level 3 starts(hasn't been coded yet). The main character will have to capture it to get to the next level. Therefore, it will appear every ten seconds to allow the player to have a chance to get it.
Ah, sorry. I've been doing it on the offline version so I must've only done it on that version. My problem is just making the sprite show and move after every ten seconds without slowing its speed
- deck26
-
1000+ posts
Making sprite show after every ten seconds
I'm a bit confused - does the sprite appear in level 2 after 10 seconds and then move repeatedly until that level is complete and then hide? So the ‘every 10 seconds’ refers to the move but not the show?But I don't see where you tell it to hide - it appears 10 seconds after the level up but you don't then tell it to hide do you? The snitch will appear on level 2 and will hide once level 3 starts(hasn't been coded yet). The main character will have to capture it to get to the next level. Therefore, it will appear every ten seconds to allow the player to have a chance to get it.
Ah, sorry. I've been doing it on the offline version so I must've only done it on that version. My problem is just making the sprite show and move after every ten seconds without slowing its speed
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
I'm a bit confused - does the sprite appear in level 2 after 10 seconds and then move repeatedly until that level is complete and then hide? So the ‘every 10 seconds’ refers to the move but not the show?But I don't see where you tell it to hide - it appears 10 seconds after the level up but you don't then tell it to hide do you? The snitch will appear on level 2 and will hide once level 3 starts(hasn't been coded yet). The main character will have to capture it to get to the next level. Therefore, it will appear every ten seconds to allow the player to have a chance to get it.
Ah, sorry. I've been doing it on the offline version so I must've only done it on that version. My problem is just making the sprite show and move after every ten seconds without slowing its speed
Basically, the sprite will appear after every ten seconds and scroll to the left in an attempt for the player to catch it. It will move like the sprites called “dementor” and “bludger”. If the player doesn't catch the sprite, then it will appear after another ten seconds. The sprite will then hide when it is the level after.
- Kraken_Games
-
100+ posts
Making sprite show after every ten seconds
I'll remix with my alt to try to solve
- Expelliarmus11
-
15 posts
Making sprite show after every ten seconds
https://scratch.mit.edu/projects/304259154/Complete:
Thank you so much! You've fixed it and also made it better. By the way, do you know how to fix the start? When I press “click to start”, it sometimes go straight to the gameover screen?
- Kraken_Games
-
100+ posts
Making sprite show after every ten seconds
Maybe some other time? I'm busy with a contest. . .
- deck26
-
1000+ posts
Making sprite show after every ten seconds
I've answered that in your other topic!https://scratch.mit.edu/projects/304259154/Complete:
Thank you so much! You've fixed it and also made it better. By the way, do you know how to fix the start? When I press “click to start”, it sometimes go straight to the gameover screen?
- Discussion Forums
- » Help with Scripts
-
» Making sprite show after every ten seconds