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

#1 2008-09-07 20:19:47

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Scrolling AI?

I want to know how you can position an enemy ai somewhere on a scrolling position and it can move.

Offline

 

#2 2008-09-07 20:35:48

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: Scrolling AI?

http://scratch.mit.edu/projects/deatheater/230332 press stop on that, see how there's a mini mario and mini platform, I made it so they govern where each character is in the scrolling  smile

Offline

 

#3 2008-09-09 02:42:31

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: Scrolling AI?

Instead of giving the enemy an absolute position, give them a value offset from the origin. In other words:
enemy1 FOREVER { go to x: (xscroll+enemy1x) y: (yscroll+enemy1y) }
then change enemy1x or enemy1y to move them.
That'll do it fo sho.


*sarcasm*

Offline

 

Board footer