Fangames > Engines
I Wanna Be the Engine KS Edition (For GMStudio)
TheGamerGuy500:
Thanks a bundle, but by the time I saw the reply, I had already investigated the new engine's code and injected the fixed code into my current project.
Next time I'll try to do that first thing. Unless the replacement code is super obscure...
klazen108:
Whenever I update, i'll keep a list of everything that's changed and include the code in a post here so you can always grab it like that. Should never be any huge changes!
EDIT: I have received confirmation from yoyogames that the collision detection is changing for version 1.4.1598. Therefore, if you're using version 0.9 or earlier of the KS engine, you must use GM Studio version 1.4.1567. I am working on a fix for 1.4.1598, and I'll maintain both versions until 1.4.1598 is officially released.
TheGamerGuy500:
How would I add my own values to the saveGame script? I've tried many things, and some just change another value upon loading, but this new value just never saves even when I have it in the saveGame script with the same syntax as everything else.
EDIT: Whoops. Something else kept resetting that value. It wasn't a fault with the saving script, but placing the value at the bottom before file_bin_close seems to work, would still love to see the suggested retail price (aka best method) for how to do that.
Also how would I add something to the file select for it to display a string of where the character last saved e.g. "grass area" underneath? Maybe also a global.clear to say "complete" under a completed save file? (i've been trying for literal hours and no success. Arrays are too complex apparently.)
klazen108:
If you want to add something to the save/load scripts, it has to be symmetrical. Remember that game maker has no idea how your save file is laid out, it's just reading values off of a list. Make sure to put it before the closing bracket for "dyingSave" - that's there to only save your death/time when you die, and nothing else. Here's how you do it:
(click to show/hide)
Think of it like this:
Save:
--- Code: ---Open file
Put A in file
Put B in file
Put C in file
...
Close File
--- End code ---
Load:
--- Code: ---Open file
Read something from file, put it in A
Read something from file, put it in B
Read something from file, put it in C
...
Close File
--- End code ---
Once you've added that value to the scripts, you can use it in game. So just add a "global.clear" value to the scripts, then check it when drawing the menu to see if you should display the clear message, and set it to true when you beat the game, and you're done!
TheGamerGuy500:
Well, for some reason the clear variable changes back to a variable instead of an array and throws an error upon loading a started file stating that it tries to index a variable that isn't an array. Would I have to do some complex array stuffs in the saving and loading scripts?
EDIT: Put the actual arrays in the saving script, but now when I save the game and look at the debugger, a non-completed game has a clear value of 10 and completed has 15 when I specified neither of these numbers for the clear array. I feel like such an idiot. :BibleThump:
EDIT 2: Well that's actually the number of room that the user saved in, even when following that tutorial, it still doesn't save the actual global clear variable correctly.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version