In a simple move character program around the screen, I am trying to use a custom sprite. The program works correctly with premade sprites. After loading my custom sprite, it simply isn't on the screen anywhere. I might not be using the paint program correctly? On the template the sprite that I've created is at 0,0 top left corner of screen on template. Does anyone have any suggestions of what I could be doing wrong.?
Custom sprite
Root / Programming Questions / [.]
CaneninjaCreated:
Did you load the sprite template in the program? Example, at the top of your program
LOAD"GRP4:SPRITE",0
Writing ,0 at the end just keeps the load confirmation dialog on the bottom screen from showing up. You don't need it, but it's useful if you don't want the user to have to confirm that. Keep in mind that it goes outside the quotes, not inside.
LOAD"GRP4:SPRITE",0 'Right LOAD"GRP4:SPRITE,0" 'WrongIt does sound like you are loading the file correctly, though. Try writing this, and see if it shows up:
SPSET 0,0,0,height of your sprite,width of your sprite
If the ,0 is necessary then I'm doing something completely wrong. Thank you for your help.The 0 just means to skip the dialog box asking if you want to load the file. Without it, the box will pop up every time the program is run. But regardless, it still should load the sprites. Question: You wouldn't happen to have ACLS after the LOAD command? It should come before. Perhaps you could post a sample of your code?
I mustn't be loading the sprite correctly. When I spset 0,0,0 I just get a blank screen with a blank red rectangle in the left hand of my screen when I run the program. Without me loading the grp4 file I get the first Sprite on the preloaded sprite sheet The strawberry. I will put my code in later today or tomorrow morning when I have time to get to my 3DS. Thank you for all your help.
I mustn't be loading the sprite correctly. When I spset 0,0,0 I just get a blank screen with a blank red rectangle in the left hand of my screen when I run the program.SPSET 0,0,0 won't give you the desired results. Try this:
LOAD"GRP4:SPRITE",0 SPSET 0,0,0,16,16This will place the sprite in the upper left corner of the template into your program.