Difference between revisions of "SpriteDisplay.scrollX"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>SpriteDisplay.scrollX</c>: Horizontal scroll amount subtracted from the position of all sprites on the display. This is the standard way of making it appear that the world...")
 
m (Fixed capitalization)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<c>SpriteDisplay.scrollX</c>: Horizontal scroll amount subtracted from the position of all
+
<c>[[SpriteDisplay]].scrollX</c>: Horizontal scroll amount subtracted from the position of all
 
sprites on the display.  This is the standard way of making it
 
sprites on the display.  This is the standard way of making it
 
appear that the world is scrolling past.
 
appear that the world is scrolling past.
 +
 +
See also: [[SpriteDisplay.scrollY]]; [[PixelDisplay.scrollX]]; [[TileDisplay.scrollX]]
  
 
== Example ==
 
== Example ==
Line 9: Line 11:
 
display(4).sprites.push sp
 
display(4).sprites.push sp
 
for i in range(0,500,10)
 
for i in range(0,500,10)
display(4).scrollX = -i
+
    display(4).scrollX = -i
wait 0.2
+
    wait 0.2
 
end for</ms>
 
end for</ms>
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]

Latest revision as of 00:06, 4 December 2020

SpriteDisplay.scrollX: Horizontal scroll amount subtracted from the position of all sprites on the display. This is the standard way of making it appear that the world is scrolling past.

See also: SpriteDisplay.scrollY; PixelDisplay.scrollX; TileDisplay.scrollX

Example

sp = new Sprite
sp.image = file.loadImage("/sys/pics/Wumpus.png")
display(4).sprites.push sp
for i in range(0,500,10)
    display(4).scrollX = -i
    wait 0.2
end for