Fangames > User-Made Creations
I Wanna Break Through Ario Trials
Olivebates:
To fix the touch saves, add this to the respawn script:
with (OBJECT PLAYER)
{
move_snap(32,32);
}
lemonxreaper:
that wouldn't work I think.
just make it touch S saves
Denferok:
What the fuck is this jump?!
https://puu.sh/5sD6H.png
lemonxreaper:
well its also a pain in the ass if you randomly save in the air for no reason.
Olivebates:
--- Quote from: lemonxreaper on November 24, 2013, 07:41:26 PM ---
--- Quote from: Olivebates on November 24, 2013, 07:01:31 PM ---To fix the touch saves, add this to the respawn script:
with (OBJECT PLAYER)
{
move_snap(32,32);
}
--- End quote ---
that wouldn't work I think.
--- End quote ---
Ah, right, because you are using game_save, and game_load functions.
In that case, I would hate to see your fangame be ruined over something so mundane. So I took the liberty to write the code out for you. This code will be run in the step event of the object oGameSave. It will save the players position, snapped at the oGameSave's x and y coordinates in the save file, but not actually move you when you touch it. This code will be run in the step event of oGameSave. You can then just game_load like you normally would. Remember to change "oPlayer" to what the player object is called, and "save1.save" to whatever you want your save files to be called.
--- Code: ---//The Touch Save script
if (place_meeting(x, y, oPlayer))
{
if (image_index == 0)
{
//Set saves image_index
image_index = 1;
//Save player position
var tempFile;
tempFile = file_text_open_write(working_directory + "\temp.txt");
file_text_write_string(tempFile, "
oPlayer.x = " + string(oPlayer.x) + ";
oPlayer.y = " + string(oPlayer.y) + ";
");
file_text_close(tempFile);
//Move player position
oPlayer.x = x;
oPlayer.y = y;
//Save the file
game_save("save1.save");
//Move player back, if saving for first time
if (file_exists(working_directory + "\temp.txt"))
{
execute_file(working_directory + "\temp.txt");
file_delete(working_directory + "\temp.txt");
}
}
}
else
{
//reset save
image_index = 0;
}
--- End code ---
:SupportOlive: Have a great day!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version