トピック
King 5kittens645

Questions

I have a question, how would i go about making a saving system in my game? I've been trying to figure this out for well over awhile now and i still don't get it. If you must know, the game i'm making is text-based. Anyway, i'll fill this post with more questions if i have any more, so please do help me. Thanks anyway - King
0そうだね
プレイ済み
返信[1]
親投稿
SomeThing… DJZouk2017
SAVE"TXT:HowFar" Use that to save a variable. HowFar can represent how far you are in the game, and in-game you can save by doing HowFar=HowFar+1. At the beginning of the code you can do LOAD"TXT:HowFar" and then IF HowFar=number THEN GOTO @WhereTheGameSaved multiple times. You shouldn't use GOTO at all because it ends up ruining code later on, but this is the most simple way possible.
0そうだね
プレイ済み
返信[2]
親投稿
SomeThing… DJZouk2017
It is possible to do it with REPEAT or WHILE instead of GOTO, but you can easily figure that out on your own using variables.
0そうだね
プレイ済み
返信[3]
親投稿
King 5kittens645
Ok, i'll try that but would that save literally everything you have done in the game, like for example an item tha you have picked up? BTW i have items set as variables.
0そうだね
プレイ済み
返信[4]
親投稿
SomeThing… DJZouk2017
You would have to save the item variables as well.
0そうだね
プレイ済み
返信[5]
親投稿
King 5kittens645
Ok, i don't understand this at all. Maybe i'm just doing something wrong, but this is to complicated for me. And BTW i can't use LOAD at the beginning, because i want to have the title screen send you to the loading screen.
0そうだね
プレイ済み
返信[6]
親投稿
SomeThing… DJZouk2017
You have to save the variable AFTER you do HowFar=HowFar+1.
0そうだね
プレイ済み
返信[7]
親投稿
Jacob KulcakKid4
Saving isn't really one of the things I look at very much, but I can most likely help you with other things.
0そうだね
プレイ済み
返信[8]
親投稿
*J.P.* DEV NEWPICY3
ah I just recently learned about this! so you would use the variables that say if you have items in your game (like APPLES=1 or stuff like that..) ill go pull up a picture of something that helped me learn it, brb.
0そうだね
プレイ済み
返信[9]
親投稿
King 5kittens645
I FIGURED IT OUT!!! Sorry for freaking out right there, but i've been trying to figure this out for FOREVER and i finally found out! Basically i put the Howfar variable in a save point and i set that variable as a specific number and whenever i save it saves that variable so whenever i load it it loads the Howfar variable and if it is a specific number it will send you to that specific check point
0そうだね
プレイ済み
返信[10]
親投稿
King 5kittens645
I have to at least partly thank Something... so i will put him in the credits for the game. Now, this should be my last question of the day: How do i put a sprite in a specific location? You know, something like locate but for sprites. I was thinking that it was SPOFS but every time i use it an error happens, but i am probably just using it wrong. And again, thank you @Something...!
0そうだね
プレイ済み
返信[11]
親投稿
Jacob KulcakKid4
It's really easy. Just put in: SPOFS number, x coordinate, y coordinate
0そうだね
プレイ済み
返信[12]
親投稿
*J.P.*[P]£ aj2003aj
yes simple as that
0そうだね
プレイ済み
返信[13]
親投稿
King 5kittens645
Yeah, i figured it out earlier. Btw, should i make a teaser image for the game? I'm thinking that i should, but i'm just wondering.
0そうだね
プレイ済み
返信[14]
親投稿
*J.P.*[P]£ aj2003aj
sure..? your decision.. lol.
0そうだね
プレイ済み
返信[15]
親投稿
Stewart segludian1
Looks like I am too late but attached is a save and load demo. You only really get two options with save/load, a string or an array of numbers. What you want to do is save and load the state of the player and game world. For instance what do you have in your inventory, have you found the secret door in room 27, etc. It doesn't have saving and loading, but my text adventure game is: BDWE58AV
0そうだね
プレイ済み
返信[16]
親投稿
King 5kittens645
Ok, i have yet another question (i'm sorry), my question is how would i make it where if a variable was one/greater than one then something would happen. I have been trying at it for awhile, and i haven't figured it out. And @Stewart, i may try your program tomorrow, because i am to tired to right now.
0そうだね
プレイ済み
返信[17]
親投稿
*J.P.* DEV NEWPICY3
if ITEM>1 is that what you mean? its > the number then whatever?
1そうだね
プレイ済み
返信[18]
親投稿
King 5kittens645
@Stewart, I tried your "Lost my ball" game, and i beat it! I have to admit, i did like how you had to have certain items to get other items, because it adds a good puzzle element to the game, but figuring out the commands took me awhile. Though, i couldn't understand the code.
0そうだね
プレイ済み
返信[19]
親投稿
Stewart segludian1
Thanks for trying the game, I am glad you liked it. Sorry the code was hard to follow. The code uses a room array setup where it lists what other rooms and in which direction you can go from each room. Likewise the items also reference what room they are in with player inventory being a fake room of sorts. There is another fake room for used up items too.
0そうだね
プレイ済み