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

#1 2013-05-04 14:48:28

YesItsMe
New Scratcher
Registered: 2013-04-26
Posts: 1

HELP! Project due in 5 days!

So I'm working on this scratch project of a school assignment but the script isn't working properly. My IT teacher advised me that I should ask for help on the forums. I don't know how to link the game into this so I'll tell you that the title is Retake the Base on my page. Basically the background is meant to switch once you kill 4 aliens and the code is set so that aliens killed is a variable (works fine). The background won't switch however and the aliens don't respawn, only one of them at random. It's a pain and I really need to fix these problems. Can anybody help?

Offline

 

#2 2013-05-04 16:14:33

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: HELP! Project due in 5 days!

Here, I fixed it!
http://scratch.mit.edu/projects/dracae/3315165
(To post the link, copy and paste it in your post)

Offline

 

#3 2013-05-04 16:30:21

OrcaCat
Scratcher
Registered: 2010-06-30
Posts: 500+

Re: HELP! Project due in 5 days!

dracae wrote:

Here, I fixed it!
http://scratch.mit.edu/projects/dracae/3315165
(To post the link, copy and paste it in your post)

Now you can click it  smile


     Awesome music     Electrode's theme     Epic music
Bye, 1.x.  sad                             Hello, 2.x!  smile

Offline

 

#4 2013-05-04 21:20:16

cauzality
New Scratcher
Registered: 2013-03-19
Posts: 44

Re: HELP! Project due in 5 days!

change background:
with the blocks that control when the aliens die (in the aliens' scripts), put

if <(Aliens Killed) = [4]>
   broadcast [next level v]

end
then, in the stage scripts, put
when i receive [next level v]
next background
respawn:
also in the aliens' scripts where you have the blocks to control when the alien dies, you can use these blocks:
wait [1] secs
go to x:[0] y:[0]
pick random [1] to [10]
show
hide
wait is in the Control drawer, go to in Motion, pick random in Operators and show and hide are both in Looks. Depending on if you want to make it take time for the aliens to respawn or not, wait can help with that. Go to will put the alien at the coordinates you tell it and for a random respawn, put pick random blocks in for the x and y coordinates of your go to block. the screen goes from -240 to +240 for x (the horizontal) and from -180 to 180 for y (the vertical).

Offline

 

#5 2013-05-04 23:23:37

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: HELP! Project due in 5 days!

I fixed the Alien script so the process wouldn't only repeat 2 times.
Hope it helps!  big_smile
(Y U NO Shorter, 180 second wait? D smile

Offline

 

Board footer