Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
- MReeseH
- Scratcher
7 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
I'm trying to make clones that are created once they enter the “Screen Zone” also known as the X and Y area your given.
I've been looking on this Forum for a solution for awhile now, but i couldn't find a post with any helping info. I've also tried solving it myself but I've been stumped.
if anyone knows how to do this please help
I have a small example script that will give you an idea of what i need
I've been looking on this Forum for a solution for awhile now, but i couldn't find a post with any helping info. I've also tried solving it myself but I've been stumped.
if anyone knows how to do this please help
I have a small example script that will give you an idea of what i need
when green flag clickedI need help making the Off-screen Clones (non-existing) and Clones move, and the player would be in the middle collecting these objects. These objects would also make a new one within the set world boundaries being 10000 by 10000 large. Thank you so much again to anyone that helps
repeat (NumOfFakeClones)
add (pick random (-10000) to (10000)) to [Xpos v]
add (pick random (-10000) to (10000)) to [Ypos v]
end
if <CloneOnScreen> then
create clone of [Object v]
end
when I start as a clone
forever
go to x: (item (CloneID) of [Xpos v] :: list) y: (Item (CloneID) of [Xpos v] :: list)
end
Last edited by MReeseH (March 7, 2018 00:02:49)
Dragons!
- MReeseH
- Scratcher
7 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
Please Help?
Dragons!
- Dairop
- Scratcher
100+ posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
when green flag clicked
set [ n° clone] to [0]
repeat (x)
change [ n° clone] by (1)
add (pick random (-10000) to (10000)) to [x pos]
add (pick random (-10000) to (10000)) to [y pos]
create clone of [ object]
end
when I start as a clone
forever
go to x: ((item ( n° clone) of [x pos] ) - (x player)) y: ((item ( n° clone) of [y pos] ) - (y player))
if <touching [ border of the screen] ?> then
hide
else
show
end
end
Good luck for your project
- MReeseH
- Scratcher
7 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
Thanks, but I was hoping for a post that helped me make almost 500 “clones”, they wouldn't be created until they were is the screen's view if they werent they would be deleted. I'm planning to make a very big world, and I might even go up to 1000 “clones”.
Last edited by MReeseH (March 7, 2018 00:01:58)
Dragons!
- hedgehog_blue
- Scratcher
1000+ posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
Making the game tile based might make things easier with this. Then you can just list the look of each tile, and some clones could automatically stay on the screen and change to the look of which tile must be there. You can make the clones move slightly, by having them go to the corner plus the remainder of the player's position divided by the width of the tiles (using mod) and use the same to detect which tiles must be there. If otherwise, other methods would all be laggy or not fit all possible conditions.
I know I didn't help much, but it is a hard task and this may be the best thing to do.
I know I didn't help much, but it is a hard task and this may be the best thing to do.
- AveryBrodyA
- Scratcher
41 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
when green flag clicked
repeat (10000)
add [] to [list v]
end
define Make Clone X: (X) Y: (Y) Size: (Size.) Index: (Index)
hide
set size to (Size.) %
go to x: (X) y: (Y)
replace item ((Index) / (3)) of [list v] with (X)
replace item (((Index) / (3)) + (1)) of [list v] with (Y)
replace item (((Index) / (3)) + (2)) of [list v] with (Size.)
define Ex. Move X: (X) Y: (Y) Index: (Index)
go to x: ((Index) / (3)) y: (((Index) / (3)) + (1))
replace item ((Index) / (3))of [list v] with (((Index) / (3)) + (X))
replace item (((Index) / (3)) + (1)) of [list v] with ((((Index) / (3)) + (1)) + (Y))
- EPICPIKAGUY
- Scratcher
100+ posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
It's not that hard really. I did it here
- AveryBrodyA
- Scratcher
41 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
and a script to cover nil (none) items with the background color.
- MReeseH
- Scratcher
7 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
thx everyone
Last edited by MReeseH (March 7, 2018 04:07:41)
Dragons!
- cbletson
- Scratcher
27 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
here is what i have come up with do far it isn't done yet though. here
The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun
when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
- cbletson
- Scratcher
27 posts
Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.
sorry its late it didn't post when i hit post that was before everyone posted something
The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun
when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
- Discussion Forums
- » Help with Scripts
- » Please Help, I'm trying to bypass the clone limit Using Using X and Y lists but I'm Stumped.