トピック
☆CodeZeяo☆ Code-Zero-666

I really need an answer, how do I save in-game stats like player level, hp etc....

4そうだね
プレイ済み
返信[1]
親投稿
Josh josh.h7
Like this level$=STR(level) hp$=STR(hp) gamesave$="" gamesave$=gamesave$+level+hp$ then you save it SAVE "TXT:gsave",gamesave$ then you can load it LOAD "TXT:gsave" OUT gameave$ then use MID() to get the spot they"re at And turn it back into what it was before hp=VAL(hp$) level=VAL(level$)
2そうだね
プレイ済み
返信[2]
親投稿
☆CodeZeяo☆ Code-Zero-666
thank you, if ot's not to much of a bother could you explain MID()
0そうだね
プレイ済み
返信[3]
親投稿
Josh josh.h7
MID() extracts characters from a string, like this otherstring$=MID$(string$ ,Start position,Number of characters)
1そうだね
プレイ済み
返信[4]
親投稿
☆CodeZeяo☆ Code-Zero-666
ok, so if I used hp=580 sp=345 SaveGame$="Data" SaveGame$=SaveGame$+hp$+Sp$ then saved it I would load it load "txt:save" odd SaveGame$ then SaveGame$=MID$("Data",???) hp$=val(hp) sp$=val(sp) i get confused their and it never loads the hp
0そうだね
プレイ済み
返信[5]
親投稿
Josh josh.h7
hp=580 sp=345 IF HP<0 OR HP>99 THEN HP=99 IF SP<0 OR SP>99 THEN SP=99 SaveGame$="Data:" SaveGame$=SaveGame$+hp$+Sp$ SAVE"TXT:SAVE",SaveGame$ LOAD "TXT:SAVE" OUT SAVEGAME$ then HP$=MID$(GAMESAVE$,0,2) SP$=MID$(GAMESAVE$,2,2) hp$=val(hp) sp$=val(sp)
1そうだね
プレイ済み
返信[6]
親投稿
☆CodeZeяo☆ Code-Zero-666
Thank you ^^
0そうだね
プレイ済み
返信[7]
親投稿
☆CodeZeяo☆ Code-Zero-666
w-what am I doing wrong?
0そうだね
プレイ済み
返信[8]
親投稿
Josh josh.h7
I found the problem change LV$=MID("GAMESAVE",7,2) to LV$=MID(GAMESAVE$,7,2) and if you show me the saving i can see if there is any other problems in the loading
0そうだね
プレイ済み
返信[9]
親投稿
☆CodeZeяo☆ Code-Zero-666
here ya go ^^
0そうだね
プレイ済み
返信[10]
親投稿
Josh josh.h7
@SAVE LINESPACE$="\" do this to the others IF LV<1 THEN LV$=STR$(LV):LV$=LV$+LINESPACE$ ELSE LV$=STR$(LV) GOLD=STR$(GOLD) EXPP$=STR$(EXPP) HP$=STR$(HP) SP$=STR$(SP) ATK$=STR$(ATK) DF$=STR$(DF) POTION$=STR$(POTION) HERB$=STR$(HERB) SWORD$=STR$(SWORD) SHIELD$=STR$(SHIELD) ARMOR$=STR$(ARMOR) BOOTS$=STR$(BOOTS)
0そうだね
プレイ済み
返信[11]
親投稿
Josh josh.h7
HFS$=STR$(HFS) FIRSTSAVE$=STR(FIRSTSAVE) GAMESAVE$="DATA" GAMESAVE$=GAMESAVE$+LV$+LINESPACE$+GOLD$+LINESPACE$+EXPP$+LINESPACE$+HP$+LINESPACE$+SP$+LINESPACE$ +ATK$+LINESPACE$+DF$+LINESPACE$+POTION+LINESPACE$+HERB$+LINESPACE$+SWORD$+LINESPACE$+SHIELD$+ LINESPACE$+ARMOR$+LINESPACE$+BOOTS$+LINESPACE$+HFS$+LINESPACE$+FIRSTSAVE$+LINESPACE$ SAVE"TXT:HOLLOWFD",GAMESAVE$
0そうだね
プレイ済み
返信[12]
親投稿
Josh josh.h7
and for loading LOAD "TXT:HOLLOWFD" OUT GAMESAVE$ do this to the others aswell checks the numbers LV$=MID(GAMESAVE$,3,2) CHECKSTR$=MID(LV$,1,1) IF CHECKSTR$=="/" THEN LV$=MID(GAMESAVE$,3,1) if you have any problems with it let me know :)
0そうだね
プレイ済み
返信[13]
親投稿
☆CodeZeяo☆ Code-Zero-666
thanks josh ^^
0そうだね
プレイ済み
返信[14]
親投稿
☆CodeZeяo☆ Code-Zero-666
umm dumb question, How would I get the sprite to animate, Because in petit computer it worked like spset 0,9,0,0,0,0,0 and spofs 0,x,y then spanim 0,5,4 but spanim is not working for me
0そうだね
プレイ済み
返信[15]
親投稿
Josh josh.h7
You don't need to use SPANIM, you can do this ;)
1そうだね
プレイ済み
返信[16]
親投稿
☆CodeZeяo☆ Code-Zero-666
<3 thanks
0そうだね
プレイ済み