Is there a way to repeat a command's effects with a different variable outcome? As I adjust the health bar code I need something like this.

Edit: That was interesting. I learned how to put aimbot into my own game. I edited some SPOFS code and wherever I aimed the zombie sprite would follow the aiming crosshair. It aimed FOR me. It was amusing and weird at the same time. I can hack my own game now.

Aw jeez. I was all ready to begin adding this, but then I realized a snag. My sprite handler also has the ability to freeze a sprite in the middle of the animation (meant for using Flashman's weapon), and then have the animation resume later on. That's something I can't do with SPANIM. I can't even swap between the two in the middle of the animations because then I would have to keep track of the animation frame/delay, nullifying any performance gain I would have had, and that's only if my program never dropped below 60fps since using SPANIM isn't restricted to code execution of VSYNC.....

Ok, forget what I posted, because I think I found a way around it. Since animation via SPANIM relies on the screen refresh rate rather than the program loop, it means I can use MAINCNTx to figure out which frame and frame increment the moment my freeze operation gets applied, force it to stop animating by setting the character index with SPCHR and setting 1 frame for SPANIM, then when I resume, I can manually animate the sprite until it loops around, to which then I'll give back control to SPANIM.

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

now the issue is when running from gallery...
BGU0 doesn't load LA00_PNG properly.
It draws the tiles at the top.
Then when I begin placing the tiles on the touch screen.. petit computer does something REALLY MESSED UP
it decides that it's going to use it's own BUILT IN tileset instead of BGU0
What the heck is going on here? Can somone help???

SET BGPAGE to 1
Try to use UPATEFULL from discostew's engine to update.
Tiles are petit computer's default tiles on bottom screen.
Running it again fixes it (I'm assuming because the second time BGPAGE is set to 1 by default)
Going to try setting BGPAGE to 1 first..... I hope this doesn't break... Urgh.

EDIT: Okay so... if anyone cares in the future. DONT load your own BG TILES. and then SET BGPAGE to a page that it wasn't set to you loaded them.
It messes up and somehow un loads the tiles you loaded. Yet it's fine if you don't switch BGPAGES again. I hope this helps someone I wasted hours with gcls and clear and acls and GPRIO trying to fix it... out of other issues... kay thanks. ANd I'm sorry that in future code with BGPAGE I will be forced to basically load multiple bgs all at once for both BGPAGES. Hope you don't mind the wait times for these! (They seem fast? )

I have a program that has gotten a little complicated, I made a bad habit of having goto commands inside go sub routines, and as you can imagine, after the program has been running awhile, I get out of memory errors (probably because the program has been looking for a RETURN command for too long).

I thought I could get around this by forcing the player to save between levels, then sending the program back to the first line and using CLEAR.

I noticed however, that even if you use CLEAR, the program remembers it is looking for a RETURN command, does anyone know a way around this? (aside from going through all my goto and GOSUB routines and cleaning things up, which I realise may be the only solution).

@brizobst Every GOSUB must have a RETURN. PTC can only hold so many pointers in the stack before it overflows (out of memory), and each RETURN reduces that stack by one. CLEAR only messes with variables and arrays. The pointer stack for GOSUB/RETURN gets cleaned out each time the program starts (not when it ends because doing a break and then using CONT allows it to keep going under some circumstances, retaining what it had in memory).

Also, would I still need MID$ for the effect? I saw that MID$ picks how much of the text to display, and the speed at which to display. Lastly, for some reason I'm getting duplicate definitions for DIM TEXTS$(3). I use CLEAR when the program starts, but for some reason, it doesn't have an effect. It's only when I put it in the subroutine and it works, though obviously I don't want to put it there as it would keep clearing the amounts.

So I'm not advertising this but I'm advertising this. I fixed alot of issues with my editor I was up all night lastnight.
I worked really hard on this so far and I just wanna give back to the community.
This editor can't save yet but in the future it will be useful for making very large maps that are 255 by 255, or larger.
Something that SCRED can not do.http://imgur.com/hlb1mOM
The instructions are in the program if you get lost private message me or post questions about it here. I don't know how fast the forum will move but I'll probably skim for responses to my post later.
I'd like some feedback to if you try it if it isn't asking too much, I need to bug test it so yeah. Just give it a try if you like map editors.

@Gimmemorecoinz The art looks great. I don't really know how to use map editors well, but when I wanted to switch to a different part of the tileset, (e.x switching from a part of the tree to the green grass), the part of the map I already selected and put where I wanted on grid moved too. Is that supposed to happen?

CHRED question. If I am creating custom sprites in this program, when I save am I only saving the sprites I see on page 0 or am I saving all other pages? I am making Mortal Kombat characters 4x4 which puts one character set per row for two character sets per page. Can I use the other page numbers and get more characters per file? Or do they save like SPU0, SPU1, ... SPU7?

Jumping mechanics will require some math and physics understanding, specifically involving gravity. This subject isn't very hard once you have the basics down. You've got gravity, which pulls down the character at a certain rate per second. This is accumulated into velocity per frame, so that the next frame will be equal to the previous frame plus the pull of gravity. Imagine gravity is about 0.25 pixels per frame, and you start out at 0 pixels for velocity. The next frame adds gravity to equal 0.25. The frame after adds another, making it 0.5. The next one makes 0.75. Etc, etc. etc. In terms of positioning, you add this velocity to the character per frame, so if the character's vertical velocity is at 0 pixels and Y position is 100, the next frame would make velocity at 0.25 and adds that to position to make 100.25. The frame after that increases velocity again so it becomes 0.50, and adding that to position would make 100.75. Etc, etc, etc. It may look like it affects positioning very slowly, but we're dealing with 60 frames per second, and after 60 seconds, velocity will have become about 15 pixels and will continue to increase.

So, now, we have the basics for how gravity affects an object, but how do we make a character jump? Well, it's real simple from this point on. When you press a button to make the character jump, change the velocity of the character to some negative number (since gravity is a positive number, and the screen from top to bottom in pixels is 0 to 191). Try an initial velocity like -3 (which based on the screen is upwards), and then fiddle with the number or a bigger or smaller jump. When faced with touching the ground, hitting the ceiling, etc, change the velocity to 0 to reset it.

Now, about making the initial jump, you may only want to make the character jump when touching the ground (unless you want the character to jump while in the air for a reason, like a double-jump). Assume only jumping from the ground. This means you need some indicator with the character on whether you are touching the ground. What I did with my project is that each frame, I checked the space below the character. If it is empty, then the character is not touching the ground. Else, he is, so I then made it that if he is touching the ground, then the button to make him jump would be allowed.