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

#1 2012-08-12 17:20:52

RCScratch
Scratcher
Registered: 2010-05-26
Posts: 48

Autoscrolling Platformer engine

First of all, you can use your own jump script.
It requires that your character move seperately from the scroll.
This is the same auto scroll engine i use for Blob on the Moon - Part 3

when I receive [begin v]
forever
 if <key [left arrow v] pressed?>
  change x by (-5)
 end
 if <key [right arrow v] pressed?>
  change x by (5) // this will be negated by the scroll speed
 end
end
when I receive [begin v]
forever
 change [scrollx v] by (join [-] (autoscroll-speed)) // this will partially negate the scroll speed
 change x by (join [-] (autoscroll-speed)) //  do not make the scroll speed faster than the character's motion.

Last edited by RCScratch (2012-08-12 17:35:44)


http://i736.photobucket.com/albums/xx7/RCScratch/RCSCRatch.gif http://www.danasoft.com/sig/467044211994.jpg

Offline

 

Board footer