Discuss 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
41 posts

when i attack a object it crashes my scratch

Are you trying to make a tree spawn somewhere else?
Bcannops
Scratcher
41 posts

when i attack a object it crashes my scratch

You can add
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

Bcannops wrote:

You can add
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
ok ill try that and how do i set a description
Bcannops
Scratcher
41 posts

when i attack a object it crashes my scratch

wdym set a description?

Powered by DjangoBB