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

#1 2012-04-28 06:37:21

ZombieAttack
New Scratcher
Registered: 2012-04-16
Posts: 3

Glide & Disturb

Hi guys. I'm making a robot game. How do I make it glide to where I want? Cuz I have this chat bar, and when i click a button on it, the robot comes onto the chat bar and messes it up.  TELL MEH. P.S. I am new to scratch forums. i have projects, but never been here before.

Offline

 

#2 2012-04-28 10:03:21

BetaSmozzick
Scratcher
Registered: 2012-02-25
Posts: 51

Re: Glide & Disturb

Oh ok I think I see the problem.

So when you click somewhere on the screen the robot glides to it, right?

So to stop it from going into the chat bar you need to put up an if statement.

After the bit that says

 if <mouse down?> 
Put an if that says, for example, that the y position must be higher than whatever the y top of the chatbox is and that the x position must be greater than whatever the x position at the right of the chatbox is. Get that?

Offline

 

#3 2012-04-28 11:31:30

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Glide & Disturb

if <mouse down?>
if <not<<y position> < <top of chatbox>>> //if the chatbox is on the bottom
glide (whatever) secs to x: <mouse x> y: <mouse y>
end
end

Offline

 

Board footer