Fangames > Programming Questions
Touch Saves
(1/1)
Swordslinger:
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?
Starz0r:
--- Quote from: 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?
--- End quote ---
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:
lemonxreaper:
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)if place_meeting(x,y,player){
if keyboard_check_pressed(ord("S")){
if (saveTimer < 0 && instance_exists(player) == true) {
saveTimer = 30;
image_index = 1;
image_speed = 0.017;
saveGame(0);
}}}
this also fixes saving in the ground on smaller blocks.
:BloodTrail:
Olivebates:
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;
}
Navigation
[0] Message Index
Go to full version