Program1031.comTM
Game Programming Help for Beginners and Experts
Home Need Quick Help?
Questions and Answers
Get Exclusive Stuff!
Email Newsletter

Question:
How do you move the position of a sprite in smileBASIC?


Answer:

After defining your sprite using the command SPSET, you can use the command SPOFS to move it to a different position on the screen! Let's say your sprite definition number is 0 for the sprite you want to move. Your code would look like this:

SPOFS 0,60,100

SPOFS allows you to change the X coordinate and Y coordinate of a sprite on the screen. So in the above example, the 60 is the new X coordinate and 100 is the new Y coordinate of the sprite.

Run this code and see what happens. Your sprite should now have a new position on the screen! Congratulations! Try to make the sprite go in other parts of the screen! Explore and see what you can do!

Page updated: October 17th, 2015 @ 11:23 PM Eastern Time

Game Making Tutorials
Find tutorials about your favorite game creation software! Use the navigation below!

Game Maker: Studio
Help, References, and Tutorials
RPG Maker Fes
Help, References, and Tutorials
smileBASIC
Help, References, and Tutorials

Download Books
Search Downloadable Books from Program1031.com

Home Questions and Answers Email Newsletter
Content and Design © 2012-2019 Program1031.com. All Rights Reserved.
All Copyrights and Trademarks of mentioned products are copyrights and trademarks of their respective owners.
Our other websites: