Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » "When I start as a clone" script not responding.
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
I'm making a Tower Defense game at the moment, and every time I try it, my “when I start as a clone” scripts don't respond to clones being created.
Here are the scripts on imgur, any idea what's wrong?
http://i.imgur.com/wjZ1b3g.png
Here are the scripts on imgur, any idea what's wrong?
http://i.imgur.com/wjZ1b3g.png
Last edited by BilboUnicorn (Aug. 16, 2015 15:51:26)
- deck26
-
Scratcher
1000+ posts
"When I start as a clone" script not responding.
You need to share the project rather than give us an image to try to read.
In what way are the scripts not responding - do the clones get created but not do anything or not appear? (If you create a clone and it is touching red it will get deleted straight away after changing Cash.
In what way are the scripts not responding - do the clones get created but not do anything or not appear? (If you create a clone and it is touching red it will get deleted straight away after changing Cash.
- daemys
-
Scratcher
100+ posts
"When I start as a clone" script not responding.
repeat until <(item (i) of [types v]) = [n]>
Is n a variable name? If so you can't use it in such a manner. It's a comparison with a string “n”.
Last edited by daemys (Aug. 16, 2015 16:11:49)
- jamy_hensley
-
Scratcher
100+ posts
"When I start as a clone" script not responding.
It's difficult to debug a picture. IMO thing are happening but too fast for you to see. There are no wait blocks in your code. Your clone moves through the maze and gets deleted without you noticing. Personally when I want to debug a “non responding” script I put some say or ask blocks to make sure the script has run.
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
Originally, that was supposed to be left blank so the script would stop repeating once it found an empty place on the lists, but an empty space wasn't working for some reason. When I left it blank, it would produce the sprites normally, but once it was done it would just spam out hundreds upon hundreds.repeat until <(item (i) of [types v]) = [n]>
Is n a variable name? If so you can't use it in such a manner. It's a comparison with a string “n”.
It's based on this page, but as I mentioned, leaving it blank wasn't working:
http://wiki.scratch.mit.edu/wiki/How_to_Make_a_Tower_Defense_Game
Last edited by BilboUnicorn (Aug. 16, 2015 16:53:07)
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
You need to share the project rather than give us an image to try to read.Yes, that's right. The clones get created but nothing appears. If I click on the ‘When I start as a clone’ button to activate them manually, they appear.
In what way are the scripts not responding - do the clones get created but not do anything or not appear? (If you create a clone and it is touching red it will get deleted straight away after changing Cash.
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
It's difficult to debug a picture. IMO thing are happening but too fast for you to see. There are no wait blocks in your code. Your clone moves through the maze and gets deleted without you noticing. Personally when I want to debug a “non responding” script I put some say or ask blocks to make sure the script has run.I tried that, to no avail.
And to all of you who are helping, I don't know why I don't like sharing projects, but I don't.. I will if I have to, though.
- deck26
-
Scratcher
1000+ posts
"When I start as a clone" script not responding.
So they're probably being deleted - perhaps because the sprite is in a different position when the project is running and they're touching red immediately. However it's impossible to diagnose without being to run the project.You need to share the project rather than give us an image to try to read.Yes, that's right. The clones get created but nothing appears. If I click on the ‘When I start as a clone’ button to activate them manually, they appear.
In what way are the scripts not responding - do the clones get created but not do anything or not appear? (If you create a clone and it is touching red it will get deleted straight away after changing Cash.
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
Thanks all for helping me figure this out, I just did. It's the script saying if the costume # is 1 then delete the clone, they're all getting deleted immediately.
- BilboUnicorn
-
Scratcher
26 posts
"When I start as a clone" script not responding.
Noice, windows 10Critics call it “The cleaner, slicker version of the mistake that was Windows 8”.
- Discussion Forums
- » Help with Scripts
-
» "When I start as a clone" script not responding.