Ideas wrote:
May I Join?
Yes, welcome.
Offline
Offline
Offline
Good Afternoon.
I desperately need help with a part of my script.
I need to create a scratch game that makes puzzles amongst other things, could you please help me?
I do not know how to create puzzles using scratch.
Sincerely
Kuhey
Offline
Kuhey wrote:
Good Afternoon.
I desperately need help with a part of my script.
I need to create a scratch game that makes puzzles amongst other things, could you please help me?
I do not know how to create puzzles using scratch.
Sincerely
Kuhey
A puzzle is a bit vague so tell us what sort of puzzle you want and we will help you to the best of your ability.
JH1010 - Head of the SWT (Scripts Workshop Team)
Offline
Since no-one is asking, here is a script for online games
when gf clicked set [online? v] to [offline]//first set this to offline to see if online say [online] for ([0] / [0]) secs//this will only continue the script if online, and if offline the divide block will turn red and the script will freeze because of the mathematical error set [online? v] to [online]//if you are online then this varible will switch to online stop script//replace stop script with your online script or do it on a different script
Offline
Offline
Offline
How do you make a script find a specific vowel in a word and replace it with a different letter e.g replace letter u in 'put' with o . But not anything like the following script,
when gf clicked replace (letter [2] of [put]) with [o]
Offline
Ideas wrote:
How do you make a script find a specific vowel in a word and replace it with a different letter e.g replace letter u in 'put' with o . But not anything like the following script,
when gf clicked replace (letter [2] of [put]) with [o]
Sadly there isn't a quick way to do this in Scratch. Here's the shortest script that I thought of:
set [letter v] to (1) set [letter2 v] to (1)//1 if you want the first e, 2 for the second, ect.. set [word v] to () set [word2 v] to [the phrase/word you begin with] repeat (length of (word)) if <(letter (letter) of (word2)) = [wanted letter to be replaced]> change [letter2 v] by (-1) if <(letter2) = (0)> set [letter2 v] to (1) repeat ((letter) - (1)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end set [word v] to (join (word) [what you want to replace the letter]) change [letter2 v] by (1) repeat ((length of (word2)) - (letter)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end end End change [letter v] by (1) endOnce you've run this, variable (word) will become the word you wanted.
set [letter v] to (1) set [letter2 v] to (2) set [word v] to () set [word2 v] to [I got an A+!] repeat (length of (word)) if <(letter (letter) of (word2)) = [a]> change [letter2 v] by (-1) if <(letter2) = (0)> set [letter2 v] to (1) repeat ((letter) - (1)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end set [word v] to (join (word) [Chuck Norris]) change [letter2 v] by (1) repeat ((length of (word2)) - (letter)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end end End change [letter v] by (1) endAfter running the code, I would get back "I got an Chuck Norris+!"
Last edited by ErnieParke (2012-10-14 15:39:27)
Offline
TheSupremeOverLord copied us >:(
Last edited by Firedrake969 (2012-10-16 19:50:31)
Offline
Firedrake969 wrote:
TheSupremeOverLord copied us >:(
People are bound to copy/remix popular ideas. At least let's try and make this one prosperous.
Offline
ErnieParke wrote:
Firedrake969 wrote:
TheSupremeOverLord copied us >:(
People are bound to copy/remix popular ideas. At least let's try and make this one prosperous.
If people need help. Let's hold a scripting contest.
Offline
Firedrake969 wrote:
TheSupremeOverLord copied us >:(
In some ways, I feel cheated. But I aso feel honoured that he thinks that this is a good idea.
Offline
ErnieParke wrote:
Ideas wrote:
How do you make a script find a specific vowel in a word and replace it with a different letter e.g replace letter u in 'put' with o . But not anything like the following script,
when gf clicked replace (letter [2] of [put]) with [o]Sadly there isn't a quick way to do this in Scratch. Here's the shortest script that I thought of:
set [letter v] to (1) set [letter2 v] to (1)//1 if you want the first e, 2 for the second, ect.. set [word v] to () set [word2 v] to [the phrase/word you begin with] repeat (length of (word)) if <(letter (letter) of (word2)) = [wanted letter to be replaced]> change [letter2 v] by (-1) if <(letter2) = (0)> set [letter2 v] to (1) repeat ((letter) - (1)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end set [word v] to (join (word) [what you want to replace the letter]) change [letter2 v] by (1) repeat ((length of (word2)) - (letter)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end end End change [letter v] by (1) endOnce you've run this, variable (word) will become the word you wanted.
For example, let's say I have "I got an A+!" and I want to replace the second "a" with "Chuck Norris" I would then edit the code so that it looked like this:set [letter v] to (1) set [letter2 v] to (2) set [word v] to () set [word2 v] to [I got an A+!] repeat (length of (word)) if <(letter (letter) of (word2)) = [a]> change [letter2 v] by (-1) if <(letter2) = (0)> set [letter2 v] to (1) repeat ((letter) - (1)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end set [word v] to (join (word) [Chuck Norris]) change [letter2 v] by (1) repeat ((length of (word2)) - (letter)) set [word v] to (join (word) (letter (letter2) of (word2))) change [letter2 v] by (1) end end End change [letter v] by (1) endAfter running the code, I would get back "I got an Chuck Norris+!"
what's a chuck norris ?
Offline
dvd4 wrote:
ErnieParke wrote:
Lots of code...
After running the code, I would get back "I got an Chuck Norris+!"what's a chuck norris ?
That was a joke. Anyway, a Chuck Norris+ is the best grade you can get.
Offline
Offline
Hi Scripts Workshop Team,
I thought i should tell you lot about this before i make it:
I am thinking about making a topic where scratchers help find and correct any glitches with a project. It is not general help with scripting as such and I plan to add a link to your topic for people who do want general scripting help
~Willpower~
Offline
Willpower wrote:
Hi Scripts Workshop Team,
I thought i should tell you lot about this before i make it:
I am thinking about making a topic where scratchers help find and correct any glitches with a project. It is not general help with scripting as such and I plan to add a link to your topic for people who do want general scripting help
~Willpower~
I, in return, shall post a link to your thread.
Last edited by JH1010 (2012-10-20 03:42:32)
Offline
JH1010 wrote:
Willpower wrote:
Hi Scripts Workshop Team,
I thought i should tell you lot about this before i make it:
I am thinking about making a topic where scratchers help find and correct any glitches with a project. It is not general help with scripting as such and I plan to add a link to your topic for people who do want general scripting help
~Willpower~I, in return, shall post a link to your thread.
Thank you! I will create it this afternoon since I am going out in 30 mins
EDIT- woo The Tester Team is go!
Last edited by Willpower (2012-10-20 08:31:53)
Offline
Hi Scripts Workshop Team,
I am a teacher in need of help! I have a student who has worked exceptionally hard on creating a mario style jumping game. He has used scroll x and velocity jumping. When the sprite jumps onto a platform, all works well, the sprite moves along the top of the platform but if it doesn't quite make the top, it ends up moving through the middle. Have looked for along time at his script blocks but can't see where to make amendments. Any help offered much appreciated.
Here is a link to his game :
http://scratch.mit.edu/projects/chriskneller/2847938
thanks!
Offline
chriskneller wrote:
Hi Scripts Workshop Team,
I am a teacher in need of help! I have a student who has worked exceptionally hard on creating a mario style jumping game. He has used scroll x and velocity jumping. When the sprite jumps onto a platform, all works well, the sprite moves along the top of the platform but if it doesn't quite make the top, it ends up moving through the middle. Have looked for along time at his script blocks but can't see where to make amendments. Any help offered much appreciated.
Here is a link to his game :
http://scratch.mit.edu/projects/chriskneller/2847938
thanks!
The reason why this is happening isn't becuase of the scripts, those are fine; but because you have nothing preventing Mario from getting himself stuck in a platform. If you want to, I could add some script to make it so that Mario doesn't get stuck in a platform.
Offline
Many thanks! I would love to take you up on your offer of creating a script. Have only been with Scratch for 6 months but learnt so much already. Don't want the students to lose heart with their projects because I can't help them solve problems. Look forward to seeing the solution!
Offline