Question:
How does SPSET work in smileBASIC?


Answer:

The smileBASIC command SPSET creates a sprite. A sprite in your game can do many things: move on its own, move when a player presses a button, collide with other things, be animated, and more.

Here is an example of the command:

SPSET 0,0002

The above code draws a cherry on the screen, if you are using the default sprite sheet.

The first number next to the command (in the example above, it's 0) is a number that you set to identify the sprite. Once a sprite is set a number, you can use that same number to do other things to the sprite using different commands. You can have up to 512 sprites set, using numbers 0 to 511.

The second number next to the command (in the example above, it's 0002) is the image that will display for this sprite. There are over 1000 built in sprites you can use in smileBASIC, so you can choose numbers from 0000 and up! (So 0002 in the default sprite sheet is a cherry) You can also make custom sprites in smileBASIC, too. Explore and see what you can do!

Page updated: October 17th, 2015 @ 11:41 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

Need Help?
Search answers to game development questions or ask a question yourself
Get exclusive updates from ExecuteCode.com!
Join the Email List
Download Books
Search Downloadable Books from ExecuteCode.com
Copyright 2010-2018 ExecuteCode.com.
All Rights Reserved.