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

#1 2012-08-22 12:01:58

eobcork
New Scratcher
Registered: 2012-08-22
Posts: 5

Need cube to start at top, fall and go back up again till game up.

Hi all,
I'm working on a game for my class and need a letter tile to start at the top of the screen and fall down.  At the moment, it keeps going off the screen but I want it to go back to another (random?) location at the top and start falling again until it's caught by the eater. Does anyone know how to do this?
Thanks in advance!

Offline

 

#2 2012-08-22 12:10:43

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

Hi eobcork! The script for this is actually very simple, right before your falling script, put this in,

when gf clicked
forever
if <(game still going) = [yes]>// Or however you want this to be
hide
set x to (pick random [-240] to [240])
set y to [180]
show
falling scripts //All of those scripts here
end
This will allow you to have it fall to the bottom, go back up in a random spot, and fall again. The falling scripts include making the object go down, as well as ending the game, ect. Hope this helps!  smile

Last edited by sonicfan12p (2012-08-22 12:11:14)


Why are the secret organizations getting all the attention?  mad

Offline

 

#3 2012-08-22 12:43:52

eobcork
New Scratcher
Registered: 2012-08-22
Posts: 5

Re: Need cube to start at top, fall and go back up again till game up.

Hi sonicfan12p,
Thanks for the quick reply :-)

I tried using the above but I'm just wondering what you meant by the 'yes'?  Am I also correct in thinking the red 'falling scripts' is the script I use to make it start at the top and fall down and that the 'game still going' is a variable?
Sorry about all the questions :-O    I'm new to this and still trying to figure it all out!

Offline

 

#4 2012-08-22 12:45:20

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

eobcork wrote:

Hi sonicfan12p,
Thanks for the quick reply :-)

I tried using the above but I'm just wondering what you meant by the 'yes'?  Am I also correct in thinking the red 'falling scripts' is the script I use to make it start at the top and fall down and that the 'game still going' is a variable?
Sorry about all the questions :-O    I'm new to this and still trying to figure it all out!

'yes' = If the game is still running.
Yes.


http://i50.tinypic.com/312u714.jpg

Offline

 

#5 2012-08-22 12:48:06

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

eobcork wrote:

Hi sonicfan12p,
Thanks for the quick reply :-) I try!  tongue

I tried using the above but I'm just wondering what you meant by the 'yes'?As birdbyte said, it means the game is still going, so it doesn't keep running if someone were to win or lose the game.  Am I also correct in thinking the red 'falling scripts' is the script I use to make it start at the top and fall down and that the 'game still going' is a variable?Yes to both questions.
Sorry about all the questions :-O    I'm new to this and still trying to figure it all out!

That's fine, my answers are in red. Hope that helps!  smile

Last edited by sonicfan12p (2012-08-22 12:50:12)


Why are the secret organizations getting all the attention?  mad

Offline

 

#6 2012-08-22 12:53:32

eobcork
New Scratcher
Registered: 2012-08-22
Posts: 5

Re: Need cube to start at top, fall and go back up again till game up.

aaaaagh!  It's doing my head in and thrown up another question, sorry!
Do I type in the yes beside the first 'forever, if game still playing = YES'?  If not, how exactly or what exactly goes in there?

Offline

 

#7 2012-08-22 12:57:32

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

That's okay, You type it in in the right hand box on the = block, with the variable block in the left hand side, like this.

<(game still going) = [yes]>
And then you insert this block into the if block.


Why are the secret organizations getting all the attention?  mad

Offline

 

#8 2012-08-22 13:06:18

eobcork
New Scratcher
Registered: 2012-08-22
Posts: 5

Re: Need cube to start at top, fall and go back up again till game up.

Won't get to try it out till later as have to go to class now :-( 
Will let you know how it works out though and fingers crossed I won't find some new question to ask!

Offline

 

#9 2012-08-22 13:25:28

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

Alright, good luck!


Why are the secret organizations getting all the attention?  mad

Offline

 

#10 2012-08-23 08:23:17

eobcork
New Scratcher
Registered: 2012-08-22
Posts: 5

Re: Need cube to start at top, fall and go back up again till game up.

Hi! Thanks for the help.  Managed to get it sorted :-)

Offline

 

#11 2012-08-23 10:08:49

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

Good! I hope it turns out well for you, and be sure to post on show and tell when your projects done!   wink


Why are the secret organizations getting all the attention?  mad

Offline

 

#12 2012-09-28 18:29:30

Kickin3CHICKEN
New Scratcher
Registered: 2012-09-28
Posts: 1

Re: Need cube to start at top, fall and go back up again till game up.

How do u just fall down? I need a quick answer!

Offline

 

#13 2012-09-28 18:50:54

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

Kickin3CHICKEN wrote:

How do u just fall down? I need a quick answer!

1 month and 5 days … necropst ?


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#14 2012-09-28 19:03:39

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Need cube to start at top, fall and go back up again till game up.

Kickin3CHICKEN wrote:

How do u just fall down? I need a quick answer!

Posting a month after no activity in a thread, particularly when the question has already been resolved, is considered "necroposting" (posting on a "dead" thread).  Also, posting your question on a thread already being used to answer another question makes the forums unorganized and generally hinders communication.

If you have a question, post it in a new thread  smile

In answer to your question, there is no all-purpose way to "just fall down".  When you post a new thread with your question, you should be as specific as possible.  Should it fall down until it hits a certain sprite/color?  Should it accelerate as it falls? etc.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer