トピック
debugþ TheRealJoeCool

Tips on Coding?

I am having trouble figuring out how to code. Can you help me?
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
I suggest you start by reading through the official e-manual. You can find it here... http://smilebasic.com/en/e-manual/10.php After reading it, I suggest just messing around with code, mastering every command through experimentation! If you need help with anything, you can ask away!
0そうだね
プレイ済み
返信[2]
親投稿
debugþ TheRealJoeCool
OK. Thank you kindly, Oscar!
0そうだね
プレイ済み
返信[3]
親投稿
debugþ TheRealJoeCool
How do you load a sprite onto a screen?
0そうだね
プレイ済み
返信[4]
親投稿
Oscar PwnageBlock
There are a lot of commands that are used to manipulate sprites. All of them start with SP, and probably the most basic is SPSET. This command creates a sprite by giving it a management number and a definition number. The management number serves as the sprite's unique ID, and you use this ID with most other SP commands.
0そうだね
プレイ済み
返信[5]
親投稿
Oscar PwnageBlock
The definition number is basically the sprite itself. You can check all default definition numbers in the Smile Tool by pressing the SPDEF button. The syntax for SPSET is the following... SPDEF [Management #],[Definition #] After running this, you should see the sprite in the upper left corner of the screen.
0そうだね
プレイ済み
返信[6]
親投稿
Oscar PwnageBlock
You can change where the sprite is located with SPOFS. It uses the following syntax... SPOFS [Management #],[X Coordinate],[Y coordinate] There are a bunch of other instructions that deal with sprites, (most will start with SP, as I've mentioned before) but I'll leave you to explore them on your own. Feel free to ask about anything, still!
0そうだね
プレイ済み
返信[7]
親投稿
Oscar PwnageBlock
Here's an example of placing a sprite of a piece of meat (definition number 16) near the center of the screen: SPSET 0,16 'WE LEAVE 0 AS THE MANAGEMENT NUMBER SPOFS 0,200,120 'WE SPECIFY THE SPRITE'S MANAGEMENT NUMBER, AND THE COORDINATE (200,120), WHICH IS NEAR THE CENTER OF THE SCREEN If you want to have multiple sprites, just use the SPDEF command various times with different management #s.
0そうだね
プレイ済み