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

#1 2008-11-28 00:15:14

lukeyman
Scratcher
Registered: 2008-11-07
Posts: 2

Trouble pointing towards sprite without going into the air

I am making a scratch game, with an AI walking towards me. whenever i jump, it rises into the air and then has to float down while going towards me. what is a script i could use that prevents its Y Axis from rising?

By the way its y = -62 and i tried a script saying,
"if 'y position' > -63, 'set y position to -62 "
which i thought would have solved my problem

any help would be appreciated

Offline

 

#2 2008-11-28 01:01:47

mrweston
Scratcher
Registered: 2007-12-13
Posts: 100+

Re: Trouble pointing towards sprite without going into the air

There are probably many ways to accomplish that, but here's one: Instead of using a "move 10 steps" type block for the AI (which always moves it in the direction it's facing), try using a "change x by 10" type block -- this'll keep him at the same y position, while still being able to turn and face you.

Offline

 

#3 2008-11-28 01:10:27

lukeyman
Scratcher
Registered: 2008-11-07
Posts: 2

Re: Trouble pointing towards sprite without going into the air

mrweston wrote:

There are probably many ways to accomplish that, but here's one: Instead of using a "move 10 steps" type block for the AI (which always moves it in the direction it's facing), try using a "change x by 10" type block -- this'll keep him at the same y position, while still being able to turn and face you.

oh yeah i forgot about that thanks!

Offline

 

Board footer