Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » If x position= and y position= problem
- craftingdickson
-
84 posts
If x position= and y position= problem
Hi guys,
I made a script:
⬛
⬛▀⬛
▀
bold=wood
white=leaves
However, it generated tons of crazy things, why would this happen?
I made a script:
etc. Then it will generate a tree like this
⬛
⬛▀⬛
▀
bold=wood
white=leaves
However, it generated tons of crazy things, why would this happen?
Last edited by craftingdickson (Oct. 8, 2014 00:13:32)
- drmcw
-
1000+ posts
If x position= and y position= problem
That script makes very little sense and certainly not a tree as it's just incrementing y by 32 forever. Sharing the project would be preferable.
Last edited by drmcw (Oct. 8, 2014 06:37:58)
- craftingdickson
-
84 posts
If x position= and y position= problem
Shared already long time ago, my featured project
- drmcw
-
1000+ posts
If x position= and y position= problem
Any clues where this script is in the project and how to see it run?
- craftingdickson
-
84 posts
If x position= and y position= problem
HI guys,
in my project http://scratch.mit.edu/projects/23946046/ click see inside,
in the block sprite, there is a script: (scroll to the right and scroll down a bit and u will find it)
set to (pick random (0) to (1))
set to ((pick random (-8) to (8)) * (32))
set to
when I start as a clone
forever
if <<(x position) = (x)> and <(y position) = (y)>> then
switch costume to
end
change by (32)
if <<(x position) = (x)> and <(y position) = (y)>> then
switch costume to
end
end
etc. Then it will generate a tree like this
⬛
⬛▀⬛
▀
bold=wood
white=leaves
Start my project and all the wood and leaves are in different places, Why???????
in my project http://scratch.mit.edu/projects/23946046/ click see inside,
in the block sprite, there is a script: (scroll to the right and scroll down a bit and u will find it)
set to (pick random (0) to (1))
set to ((pick random (-8) to (8)) * (32))
set to
when I start as a clone
forever
if <<(x position) = (x)> and <(y position) = (y)>> then
switch costume to
end
change by (32)
if <<(x position) = (x)> and <(y position) = (y)>> then
switch costume to
end
end
etc. Then it will generate a tree like this
⬛
⬛▀⬛
▀
bold=wood
white=leaves
Start my project and all the wood and leaves are in different places, Why???????
- lederniersamourai
-
500+ posts
If x position= and y position= problem
In sprite “block” top script at the very right.
I did not see the cloning.
So, I guess you did not yet used the script you propose in your message.
I do not know how your clones are generated and when they are killed, i.e. the exact schedule of clone execution.
But if you have a number of clones with no exact schedule, you cannot expect they will change the global variable y in the correct order. They will do it more or less randomly.
I did not see the cloning.
So, I guess you did not yet used the script you propose in your message.
I do not know how your clones are generated and when they are killed, i.e. the exact schedule of clone execution.
But if you have a number of clones with no exact schedule, you cannot expect they will change the global variable y in the correct order. They will do it more or less randomly.
- drmcw
-
1000+ posts
If x position= and y position= problem
http://scratch.mit.edu/discuss/topic/61798/?page=1#post-524906Why? Don't start a new topic, just repost on this and it will be bumped. Still cannot see scripts in the block sprite. The only when I start as a clone script looks like this
I said it here
Perhaps if you could tidy up your scripts it would save anyone else having to sort through the jumble and would be better able to help.
- lederniersamourai
-
500+ posts
If x position= and y position= problem
Yes.http://scratch.mit.edu/discuss/topic/61798/?page=1#post-524906Why don't start a new topic, just repost on this and it will be bumped.
I said it here
And following your suggestion, this problem is sufficiently difficult to set it in a “dummy project” with just that sprite and the new glitching scripts.
- craftingdickson
-
84 posts
If x position= and y position= problem
I cleaned up my scripts, the script is now on the very right and at the bottom, the par of the script I need help starts like this:http://scratch.mit.edu/discuss/topic/61798/?page=1#post-524906Why? Don't start a new topic, just repost on this and it will be bumped. Still cannot see scripts in the block sprite. The only when I start as a clone script looks like this
I said it herePerhaps if you could tidy up your scripts it would save anyone else having to sort through the jumble and would be better able to help.
- drmcw
-
1000+ posts
If x position= and y position= problem
So its the script at the end of the “when I receive chunks finished” script. Would've save time if you said it was that script first! Can you explain how you think that script will generate a tree?
- imfh
-
1000+ posts
If x position= and y position= problem
Welcome to the Scratch Forums! This is from 2014, which means it is 5 years old! Posting on something old like this makes a lot of people see it again. This is called “necroposting” which is usually not allowed. There's no need to tell everyone it is useful if it is so old. This is USEFULL
If you ever have any questions about scripting, feel free to make your own topic with the button at the top right of Help With Scripts page and people will probably be happy to help you. You might want to read Welcome to Help with Scripts to get some good tips on getting better help.
- Discussion Forums
- » Help with Scripts
-
» If x position= and y position= problem