Pages: 1
So I spent like 4 hours today working on a project. Now what I wanted to happen was have some projectiles fire, and when they hit they stamp some debris wherever they are. The projectiles move quickly (jump 50 pixels every frame) so often they would end up stopping past the object they hit, if you know what I mean. This has annoyed me a lot in many projects but this time I had found a solution and wanted to implement it. What you do is go:
if <touching?> move [-1] steps endThen you have to put a whole bunch of them together so that it moves the desired amount, like so:
if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps if <touching?> move [-1] steps end end end end end end end end end endAnd so on and so forth. But when I put together two giant pieces of 32 and 32, blam! 4 hours of work down the drain.
Last edited by radicalace (2012-08-11 19:34:23)
Offline
you probably overloaded Squeak's memory - be sure to save before copying huge amounts of stuff.
Offline
Wes64 wrote:
you probably overloaded Squeak's memory - be sure to save before copying huge amounts of stuff.
well yeah i realize that now
by the way, i got that idea from one of your projects so i partially blame you >:3
Last edited by radicalace (2012-08-11 19:41:52)
Offline
uh...
repeat (50) if <touching [something v]?> move (-1) steps else stop script
Offline
joefarebrother wrote:
uh...
repeat (64) if <touching [something v]?> move (-1) steps else stop script
He might need it to be single frame.
Offline
joefarebrother wrote:
uh...
repeat (50) if <touching [something v]?> move (-1) steps else stop script
does it really matter?
wait i can answer that!
no.
Offline
Pages: 1