? flip sprites horizontally & Vertically (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

flip sprites horizontally & Vertically

  • #1 ✎ 109 Z_E_R_O Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself could someone explain how to flip sprites without using spdef Posted
  • #2 ✎ 291 spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Like in the sprite sheet editor? The only other way I know of is to use flipped sprite data (mess with arrays or create a new sprite). Posted
  • #3 ✎ 109 Z_E_R_O Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself
    Like in the sprite sheet editor? The only other way I know of is to use flipped sprite data (mess with arrays or create a new sprite).
    Could you show me how to use sprite data to flip it without creating a flipped version of the sprite please?
    Posted
  • #4 ✎ 408 UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website in a 3d test I used #SPREVH or #SPREVV (horizontal or vertical) Like for evample SPSET 0,64,0,16,16,1+#SPREVH That uh should be all.. the spset might not be right but it gives an example atleast for how it would go... Posted
  • #5 ✎ 120 CyberYoshi64 Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength
    in a 3D test I used #SPREVH or #SPREVV (Flip horizontally or vertically) For example SPSET 0,64,0,16,16,1+#SPREVH That uh should be all.. the SPSET might not be right but it gives an example at least for how it would go...
    You need a SPDEFined sprite template 0 with UV coordinates U=0 V=0, the size of the sprite should be W=16 H=16, the origin OX=8 OY=16, and it must be visible and flipped horizontally? SPDEF 0,0,0,16,16,8,16,#SPREVH+1 If width, height and origin should be left out, you can do so. Here you go. SPSET 0,0,0,16,16,#SPREVH+1 SPHOME 8,16 If you need to change the flip on the fly, you can use SPCHR to change the attributes (like flipping).
    Posted Edited by CyberYoshi64
  • #6 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website You can also use a negative scale to flip sprites, but smileboom messed up and you have to use SPANIM rather than SPSCALE: 'flip horizontally: SPANIM id,"S",1, -1,0 'flip vertically: SPANIM id,"S",1, 0,-1 Posted
  • #7 ✎ 109 Z_E_R_O Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself ive been experementing with all the post you guys have made and they work. Thank you! The reason i need this info is because im making a battle system where when the enemy attacks you there is no transition and the battle takes place where you stand. so I needed to be able to flip the enemy sprites. Thank you! Posted