Checking Saved file
#1
Posted 28 April 2012 - 01:15 AM
#2
Posted 28 April 2012 - 04:04 AM
if file_exists(working_directory+'\saves\save1.sav')
{
sprite_index = spr_SavedSlot
}
else
{
sprite_index = spr_EmptySlot
}
That is the simplest method that I know of anyways.
#3
Posted 28 April 2012 - 10:39 PM
if you save your games w/ a certain file name (say save1.sav in the folder 'save' in your program's directory) you can do:
if file_exists(working_directory+'\saves\save1.sav') { sprite_index = spr_SavedSlot } else { sprite_index = spr_EmptySlot }
That is the simplest method that I know of anyways.
Would i put this in a step event or what event would i put this into
#4
Posted 28 April 2012 - 10:45 PM
#5
Posted 28 April 2012 - 11:05 PM
You could put it into the step event, and it would work, however that would be bad programing. In the create event should work just fine, then if you have a delete function call it again.
Thank you so far the coding is working but it looks like it erased my sprites like it checks it then my sprites don't show up
#6
Posted 28 April 2012 - 11:30 PM
#7
Posted 28 April 2012 - 11:32 PM
No i found my problem i have it set as an object as well and named both my sprite and object the same name so it got confused but i fixed it thank you for all your help it works great nowdo you have something in the draw event? If so then you need to add draw_self(); into your draw event code.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











