I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: Swordslinger on September 22, 2013, 01:32:32 AM

Title: Touch Saves
Post by: Swordslinger on September 22, 2013, 01:32:32 AM
So yes i'm working on a little game maker project with I Wanna Be The Engine Yutuu Edition, and I want to make Touch Saves, where as a touch save like in Break Through the 7 Trials, if you come in contact with the save, it saves the game instead of shooting it. How exactly do you do this?
Title: Re: Touch Saves
Post by: Starz0r on September 22, 2013, 01:43:23 AM
So yes i'm working on a little game maker project with I Wanna Be The Engine Yutuu Edition, and I want to make Touch Saves, where as a touch save like in Break Through the 7 Trials, if you come in contact with the save, it saves the game instead of shooting it. How exactly do you do this?

Try to use your brain, its not that hard. :Kappa:

Change bulletCollision event to playerCollision event is simplest way to get Touch Save effect, I'm sure there are other ways but if you want the exact way done in 7 Trails just decompile it. :FrankerZ:
Title: Re: Touch Saves
Post by: lemonxreaper on September 22, 2013, 03:41:49 AM
I would recommend using touch saves which you press S when over to save instead since standard touch saves are just annoying for the player a times.

I wrote this up for hiddow before so I have it on hand.
Put this code in an end step event

(click to show/hide)

this also fixes saving in the ground on smaller blocks.
 :BloodTrail:
Title: Re: Touch Saves
Post by: Olivebates on September 26, 2013, 07:44:19 AM

Here's a simple little script which save the game, when the player is touches the object.

Create event of save spot
//variable setup
touch = false;

in step event of the save spot
//check for player collision
if (place_meeting(x, y, oPlayer))
{
    //Check touch variable, so it wont run the code again, until you stop touching it
    if (touch == false)
    {
        touch = true;

        //save the game     
        game_save("Filename.extension");
    }
}
//When not touching
else
{
    //Reset touch variable
    touch = false;
}