Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Im making a tower Defense game but the placing system doesn’t really works
- zenzick
- Scratcher
8 posts
Im making a tower Defense game but the placing system doesn’t really works
im trying to make it when the button clicked it makes a clone and you can drag the clone and put it but it doesn’t seem to work
when I start as a clone
repeat until <Mouse down>
go to [mouse pointer v]
end
if <touching color [grey] ?> then
repeat until <not touching color grey>
change y by (-5)
end
end
- MasterofTheBrick
- Scratcher
1000+ posts
Im making a tower Defense game but the placing system doesn’t really works
The current script looks fine. Exactly what isn't working?
- zenzick
- Scratcher
8 posts
Im making a tower Defense game but the placing system doesn’t really works
When you place it keeps going down without stopping
And if you remove it they can go on the road it a bit weird
And if you remove it they can go on the road it a bit weird
Last edited by zenzick (July 18, 2021 02:37:34)
- MasterofTheBrick
- Scratcher
1000+ posts
Im making a tower Defense game but the placing system doesn’t really works
It would be helpful to link your project at this point of time.
- Eagle138
- Scratcher
500+ posts
Im making a tower Defense game but the placing system doesn’t really works
It might be because of the size of the sprite (i.e. it goes down but then touches grey again so it keeps going) When you place it keeps going down without stopping
And if you remove it they can go on the road it a bit weird
You could try either changing the y movement value to something smaller (like -1) or making the sprite go upwards by a smaller value when it touches grey for the second time.
Sorry if this is confusing (I might be entirely wrong lol) but hope it helps
~ Eagle38
coder/artist/noob animator :: he/they :: unconventional :: comment ‘e’ on my profile if you see this
just call me Eagle
fancy signature banner coming…one day
- Discussion Forums
- » Help with Scripts
- » Im making a tower Defense game but the placing system doesn’t really works