This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-16 17:19:00

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Help with script

I have a game where somes after destroying rocks a powerup spawns bu i don,t kno how to make it go to recently destroyed Rock, they are many difdrent rocks help anyone


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#2 2012-10-16 17:22:06

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Help with script

fillergames wrote:

I have a game where sometimes after destroying rocks a powerup spawns, but i don't know how to make it go to recently destroyed Rock, they are many diffrent rocks help anyone

Fixed grammar errors


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#3 2012-10-16 17:38:13

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Help with script

fillergames wrote:

fillergames wrote:

I have a game where sometimes after destroying rocks a powerup spawns, but i don't know how to make it go to the recently destroyed Rock. There are many different rocks. Help, anyone.

Fixed grammar errors

Fixed more of you grammar. Anyway, one way you could do this is have two variables called x and y. Whenever a power rock is destroyed, it sets x to its x position and it sets y to its y position. Then it broadcasts hit. From there, your powerup should have:

when I receive [hit v]
go to x: (x) y: (y)
show
your script
hide
And it will go to the recently destroyed power rock. Anyway, I hope that this helps!

Last edited by ErnieParke (2012-10-16 17:38:53)


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-10-16 18:16:45

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Help with script

Thank you for the help


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

Board footer