ChimkinTheGamer 3 Posted December 4, 2021 I want to make an anti cheat thing in my game where if you are in game outside of your home without your dog you get a message and your save file is wiped. Anyone know if this is possible without scripting? If not I'll just set them at your home at lvl 1 with nothing. No money, no armor, no weapon. Share this post Link to post Share on other sites
roninator2 257 Posted December 4, 2021 I can be done by eventing using a script command. But you have to delete all save files if you were to make sure to remove the one the player is using since you can save in multiple slots. Untested, but this is the command I use in a script. DataManager.delete_save_file(1) if DataManager.save_file_exists? 1 Share this post Link to post Share on other sites
ChimkinTheGamer 3 Posted December 4, 2021 2 hours ago, roninator2 said: I can be done by eventing using a script command. But you have to delete all save files if you were to make sure to remove the one the player is using since you can save in multiple slots. Untested, but this is the command I use in a script. DataManager.delete_save_file(1) if DataManager.save_file_exists? I wanted to avoid scripts, as I want to do most everything on my own. Share this post Link to post Share on other sites
roninator2 257 Posted December 5, 2021 (edited) Event command -> script Put the line in and see? I just tried it and it worked fine. Just have to remember DataManager.delete_save_file(0) if DataManager.save_file_exists? is for savefile01. Edited December 5, 2021 by roninator2 1 Share this post Link to post Share on other sites
PhoenixSoul 1,404 Posted December 7, 2021 Will that recognize 0..15 (array?) Share this post Link to post Share on other sites
Kayzee 4,032 Posted December 7, 2021 No, you will have to set up a loop for that like this: if DataManager.save_file_exists? (0..15).each do |i| DataManager.delete_save_file(i) end end (also 0..15 is a Range not an Array, but close enough) 1 Share this post Link to post Share on other sites