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

#1 2012-05-04 23:55:08

AliensFTW
New Scratcher
Registered: 2012-05-01
Posts: 19

Scrolling AI

I am in the process of making a scrolling game, and my scripts are the "scrollx" type of thing. The problem is, I want my bad guy to move around randomly, but I also want him to be connected to the terrain sprite that he is on, and not suddenly teleport behind you like he has been doing. If I try to make him change the scrollx variable, the screen moves randomly. Any suggestions?

Offline

 

#2 2012-05-05 00:04:44

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

Re: Scrolling AI

You have to use this script on him:

when gf clicked
set [myX v] to [0]
forever
set x to <(scroll x)+<<[480]*<whatever needed>>+(myX)>>
and instead of changing scroll x, change myX.

Offline

 

Board footer