Please help - I am trying to make scripts fall randomly from the sky. If they touch the character script the counter will go up. If they miss the character and hit the floor they will splat. How to I get their movement???
Offline
This should help,
when gf clicked forever go to x: (pick random [-250] to [250]) y: (180) glide(5)seconds to x:(x position) y:(-130) if <touching [sprite 1 v]?> change [counter v] by [1] else switch to costume [splat v] end wait (pick random [1] to [10]) secs
Last edited by sonicfan12p (2012-05-28 14:24:35)
Offline
I have a project that uses a similar mechanism, except with x, not y: Space shooter
You could download it and look at the meteor scripts.
Offline
sonicfan12p wrote:
This should help,
when gf clicked forever go to x:(pick random [-250] to [250])y:(180) glide(5)secs to x:(x position)y:(-130) if <touching [sprite 1 v]?> change [counter v] by [1] else switch to costume [splat v] end wait (pick random [1] to [10]) secs
Fixed
Offline
You could use this:
when gf clicked forever go to x: (pick random (-220) to (220)) y: (170) set [newcoin v] to [0] repeat until <(newcoin) = [1]> change y by (-2) if <touching [Player v]?> //Your player sprite. set [newcoin v] to [1] change [score v] by (1) end if <touching [Ground v]?> //Your ground sprite. Touching edge will work too. set [newcoin v] to [1] end end end
Last edited by SciTecCf (2012-05-28 13:52:05)
Offline
wasabi56 wrote:
sonicfan12p wrote:
This should help,
when gf clicked forever go to x:(pick random [-250] to [250])y:(180) glide(5)secs to x:(x position)y:(-130) if <touching [sprite 1 v]?> change [counter v] by [1] else switch to costume [splat v] end wait (pick random [1] to [10]) secsFixed
![]()
Thanks!
Offline