Hey, an anyone please give me a game to look at that has to use your character turning in 4 directions and shooting. I can't get the bullet to move right.
The problem is that when I move against a wall that doesnt lead to another area the 'me'-dot moves when the character is not. Try it for yourself, let me get the link.
INSPIRATION This is in response to Cholo's request for a game state saving engine.
DIRECTIONS This sprite saves its position, size, and costume when you click "save" and restores it to that point when you click "load". To try it out click save at a certain point, then maybe increase the speed so the sprite changes a whole bunch. Then decrease the speed down again and click load to restore the sprite to the point you had clicked save at.
WANT TO USE IT? If you want to use this save/load in your own project just download the project, export the sprite named "changing sprite", import it into your own project, and change its costumes and behaviors to your own sprite's costumes and behaviors. If you are doing a complicated project you might have to make some changes to the code. If so, read on to see how the code works or just jump into the code and figure it out by looking.
HOW THE CODE WORKS Everything about the sprite is stored in a variable when you click save. The x position is stored in a variable called x position, direction is in a variable called direction etc. Then when you click load, the numbers from the variables are put back in to the sprite. The costumes are a little more complicated. Every time you want to change the costume you have to do it in an abnormal way by broadcasting a message. Then the message changes the costume for you (and also keeps track of which costume you have in a variable). Then when it comes time to save the costume it saves the current costume variable in a more permanent variable. Finally when it's time to load up the project again it uses a bunch of "if-else" blocks to find out which costume should be loaded back.
Comments
You need to be logged in to post comments
Add a Comment
Hey, an anyone please give me a game to look at that has to use your character turning in 4 directions and shooting. I can't get the bullet to move right.
(view all replies)Comment Reply
I like this.
(view all replies)Comment Reply
This is just like my project "Saving, Loading & Cheating!!!" Here's the link: (link to project)
(view all replies)Comment Reply
Here: (link to project)
(view all replies)Comment Reply
The problem is that when I move against a wall that doesnt lead to another area the 'me'-dot moves when the character is not. Try it for yourself, let me get the link.
(view all replies)Comment Reply
Oh, Jay, would you mind helping me with something else? I need improvement on my minimap (above save/load buttons)
(view all replies)Comment Reply
Thanks. Alot.
(view all replies)Comment Reply