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

#1 2007-07-21 09:18:10

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Fish Breeding Game, I Need Some Help With It Plz ??

So, the fish glides to a random point in the tank BUT the costume doesn't change so..it moves backwards.


How do i make the costume change or the fish flip horizontally depending on if it goes to a -x or a posotive x point in the tank

big_smile

thanx in advance

----------------->     From This >    ( 8  >>             To This >    <<  8 )

Last edited by Lindsay_7321 (2007-07-21 09:21:42)

Offline

 

#2 2007-07-21 09:22:22

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Re: Fish Breeding Game, I Need Some Help With It Plz ??

I will post what i have so far so you can see what i mean.

http://scratch.mit.edu/projects/Lindsay_7321/23360

Last edited by Lindsay_7321 (2007-07-21 09:25:32)

Offline

 

#3 2007-07-21 11:27:35

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Fish Breeding Game, I Need Some Help With It Plz ??

Instead of putting the random "X" into the glide command, you'll need to put it into a variable.  Call it (eg) "New-X"

Then before the glide command:
IF (new-X > X
  Set direction to 90
Else
  Set direction to -90
Glide 3 Secs to (new X), (random y)


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#4 2007-07-21 13:15:35

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Re: Fish Breeding Game, I Need Some Help With It Plz ??

ok, ill give it a try now  big_smile

thanks

but how can you do IF (New - X > X) ??
if you can only use numbers?

Last edited by Lindsay_7321 (2007-07-21 13:19:05)

Offline

 

#5 2007-07-21 13:29:16

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Re: Fish Breeding Game, I Need Some Help With It Plz ??

no, it still goes backwards sometimes

Offline

 

#6 2007-07-21 13:36:53

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Re: Fish Breeding Game, I Need Some Help With It Plz ??

i have:

WHEN I RECIEVE "FISH1"
SHOW
GO TO FRONT

IF "New - X > x position
     SET DIRECTION TO 90
ELSE
     SET DIRECTION -90
     GLIDE TO "NEW - X"          Y PICK RANDOM "number"   "number"

Offline

 

#7 2007-07-21 13:40:36

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Fish Breeding Game, I Need Some Help With It Plz ??

Before the if, you need
"Set New-X to (pick random number suitable for the x-range)"


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#8 2007-07-21 14:59:06

Lindsay_7321
Scratcher
Registered: 2007-06-30
Posts: 25

Re: Fish Breeding Game, I Need Some Help With It Plz ??

ah,

thanxxxx!!!

Offline

 

#9 2007-07-22 08:25:52

MadModifier
Scratcher
Registered: 2007-05-27
Posts: 1

Re: Fish Breeding Game, I Need Some Help With It Plz ??

I've fixed it!
http://scratch.mit.edu/projects/MadModifier/23575

Offline

 

Board footer