#21✎ 33PlancakeIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesReadingI like to read books!HobbiesTry this:
'I don't know what type of game you're making, so I'm using an RPG as an example
CLS
DIM EN$[3,3] 'You can only have string (text) or integer (number) arrays, not a combination of both
RESTORE @EDATA
FOR J =0 TO 2
FOR I=0 TO 2
READ EN$[I,J]
NEXT
NEXT
MYHP=100
MYPOW=4
PRINT EN$[0,0]+", "+EN$[1,0]+" and "+EN$[2,0]+" are ready to fight!" 'Enemy names
PRINT "HP:"+EN$[0,1]+" HP:"+EN$[1,1]+" HP:"+EN$[2,1]
PRINT "My HP:" + STR$(MYHP)
WAIT 150
PRINT "You attack "+EN$[2,0]+" for "+STR$(MYPOW)+" damage!" 'Enemy 3
EN$[2,1]=STR$(VAL(EN$[2,1])-1)
WAIT 150
PRINT EN$[0,0]+", "+EN$[1,0]+" and "+EN$[2,0]+" are ready to fight!"
PRINT "HP:"+EN$[0,1]+" HP:"+EN$[1,1]+" HP:"+EN$[2,1]
PRINT "My HP:" + STR$(MYHP)
PRINT EN$[1,0]+" attacks you for "+EN$[1,2]+" damage" 'Enemy 2's attack power
MYHP=MYHP-VAL(EN$[1,2])
WAIT 150
PRINT EN$[0,0]+", "+EN$[1,0]+" and "+EN$[2,0]+" are ready to fight!"
PRINT "HP:"+EN$[0,1]+" HP:"+EN$[1,1]+" HP:"+EN$[2,1]
PRINT "My HP:" + STR$(MYHP)
WHILE TRUE
WEND
@LEVEL1ENEMYDATA 'You can make multiple data labels for different levels and use RESTORE to get this data, then use READ (shown above) to store it into an array
DATA "Goblin","30","5"
DATA "Beast","40","7"
DATA "Snake","15","5"
Also can't test this code, but don't worry if you can't understand it, I'll be here to help whenever I can. :)
Posted
#22✎ 109Z_E_R_OIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthNight PersonI like the quiet night and sleep late.Express YourselfZelda Is Awesome!I love The Legend Of Zelda!Express YourselfThanks to every one who helped.
I have a working system.
Its simple but it works.
You guys opened my mind to arrays and it helped a lot.
Thank you.
Elaysia would have been put on Hiatus if not for your help.
Thanks so much.
Hope you guys play it when it comes out!
Posted
#23✎ 33PlancakeIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesReadingI like to read books!HobbiesYou're welcome! If you ever need help again, just ask, we may be a small community, but we try to help each other whenever we can.
I'd love to see what you can make with SmileBASIC!
Posted