トピック
King 5kittens645

Please help me...

Ok, so I've been wanting to figure out how to make a simple program where you can make a sprite walk across the screen (preferably with a walking animation) but i can't find any helpful tutorials, nor can i figure it out myself! So please, (only if you can/want to) help me try and figure this problem out because i don't want to stay making text-based games forever.
3そうだね
プレイ済み
返信[1]
親投稿
Jacob KulcakKid4
Oh, I can help you with some other stuff that i didn't mention on your other post. First, you need SPSET. SPSET basically just creates the sprites and does nothing else. When using SPSET you put two numbers after it, the first number will be its name basically so that when you use a Sprite command, SB knows which one you want to use. The second number will be the Sprite number you choose from (tbc
0そうだね
プレイ済み
返信[2]
親投稿
Jacob KulcakKid4
The smile tool, I'm pretty sure the first Sprite (0) in the smile tool is an orange. To make the Sprite move, you need to use SPOFS. SPOFS only places the Sprite in a specified location, but when put in a loop, you can make the Sprite move with it. You put SPOFS 1(management number/name that you made with SPSET), 50(desired x coordinate) 100(desired y coordinate). SPOFS 1,50,100
0そうだね
プレイ済み
返信[3]
親投稿
Jacob KulcakKid4
When you want SPOFS to make the Sprite move instead of just placing it, you put it in a loop like said earlier. The easiest loop to use is an @ loop so I'll use one in this case for you. SPSET 1,1 @LOOP X=RND(400) Y=RND(240) SPOFS 1,X,Y GOTO @LOOP This code will make the Sprite move in random directions. try tinkering with that code to try and understand it a little better.
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.* DEV NEWPICY3
actually its the strawberry first but anyways, using INC you can INCorporate a variable so place your sprite using SPOFS 0,X,Y but then put in INC X,1 if dont right your sprite will be moving (left i think). then for animation theres two ways to do it. 1: using SPANIM which is way too confusing for most people even me lol but i would help. or 2: using SPCHR (tbc gtg)
0そうだね
プレイ済み
返信[5]
親投稿
*J.P.* DEV NEWPICY3
ANIM=0 INC ANIM,5 IF ANIM>20 then SPCHR 0,1 IF ANIM<20 THEN SPCHR 0,0 IF ANIM>40 THEN ANIM=0 something like that i think..
0そうだね
プレイ済み