Pages: 1
Topic closed
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
thanx in advance
-----------------> From This > ( 8 >> To This > << 8 )
Last edited by Lindsay_7321 (2007-07-21 09:21:42)
Offline
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
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)
Offline
ok, ill give it a try now
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
no, it still goes backwards sometimes
Offline
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
Before the if, you need
"Set New-X to (pick random number suitable for the x-range)"
Offline
ah,
thanxxxx!!!
Offline
I've fixed it!
http://scratch.mit.edu/projects/MadModifier/23575
Offline
Topic closed
Pages: 1