? How to SPSCALE Shrink sprites (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

How to SPSCALE Shrink sprites

  • #1 ✎ 13 legofordmn How do you shrink sprites? Posted
  • #2 ✎ 473 auceps Set the scale factor to something less than 1. SPSCALE ID,0.5,0.5 'sprite is half as wide and half as tall Posted
  • #3 ✎ 13 legofordmn How would I make a code where if I pushed up on the d-pad , it would make a Sprite larger and larger, and if I hit down on the d-pad it would continuously shrink a Sprite? Posted
  • #4 ✎ 211 TheV360 Pokemon Is Awesome! I love Pokemon! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself
    How would I make a code where if I pushed up on the d-pad , it would make a Sprite larger and larger, and if I hit down on the d-pad it would continuously shrink a Sprite?
    SPSET 0,413 '🐠 SCALE# = 2.0 'Start at double size. WHILE 1 'Forever: VSYNC 'Wait a frame. IF BUTTON()==#UP && SCALE#< 32 THEN:INC SCALE#,0.1 'If UP is pressed, and the scale is not too high, then increase scale. IF BUTTON()==#DOWN && SCALE#>0.1 THEN:DEC SCALE#,0.1 'If DOWN is pressed, and the scale is not too low, then decrease scale. SPSCALE 0,SCALE#,SCALE# 'Apply scale to sprite. 'Note that a scale of zero or lower results in an error. WEND
    Posted