Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » when i attack a object it crashes my scratch
- Sam0IR
-
Scratcher
100+ posts
when i attack a object it crashes my scratch
im trying to clone and delete self from a clone when it is attacked but if my object starts touched by weapon it crashes project : https://scratch.mit.edu/projects/899648196/ (im remixing it to add stuff for someone)
- Bcannops
-
Scratcher
42 posts
when i attack a object it crashes my scratch
Are you trying to make a tree spawn somewhere else?
- Bcannops
-
Scratcher
42 posts
when i attack a object it crashes my scratch
You can add
There are still a few bugs like the possibility of a tree or rock spawning in you, and not saving weather the clone was a tree or a rock, but I hope this helps
if <touching [Sprite 2 v] ?> then
wait until <[State] = [0]>
set x to (pick random (-190) to (190))
set y to (pick random (-90) to (90))
create clone of [ Myself v]
delete this clone
end
There are still a few bugs like the possibility of a tree or rock spawning in you, and not saving weather the clone was a tree or a rock, but I hope this helps
Last edited by Bcannops (Sept. 28, 2023 14:30:24)
- Sam0IR
-
Scratcher
100+ posts
when i attack a object it crashes my scratch
You can addok ill try that and how do i set a descriptionif <touching [Sprite 2 v] ?> then
wait until <[State] = [0]>
set x to (pick random (-190) to (190))
set y to (pick random (-90) to (90))
create clone of [ Myself v]
delete this clone
end
There are still a few bugs like the possibility of a tree or rock spawning in you, and not saving weather the clone was a tree or a rock, but I hope this helps
- Discussion Forums
- » Help with Scripts
-
» when i attack a object it crashes my scratch