i'm still working on the text-based RPG.
i'm trying to cut the code down some and had an idea how. problem, like all my ideas, i can't get it to work.
here's what i have that works:
Text 10,10, "Please select your weapon. "
Text 10,30, "[1]Pike [2]Billhook [3]Halberd [4]Spetum"
Text 10,50, "[5]Short Sword [6]Rapier [7]Cutlass [8]Long Sword"
Text 10,70, "[9]Mace [10]Hammer [11]Morningstar [12]Axe"
Set Cursor 10,90, : Input "",KP$
If KP$="1"
KP$=""
P_Weapon$=Weapons$(0,0) : P_WepAtt$=Weapons$(0,1)
P_WepType$=Weapons$(0,2) : P_WD=Weapons(0,0) : P_WW=Weapons(0,1)
Endif
9 races, 12 weapons, and 11 pieces of armor. 32 if's.
and weapons is the light one, loading 3 entries from the string array 'Weapons$' and 2 entries from the integer array 'Weapons'
so the idea was to replace the if statements with this:
cls
PR=Val(KP$)-1
For y=0 to 2
Player$(y)=Weapons$(PR,y)
Next y
For y=0 to 1
Player(y)=Weapons(PR,y)
Next y
what i was aiming for: to transfer the value from the two multi-dimentioned arrays (only need one from one column/each array) in to the single dimentioned 'Player$' and 'Player' arrays.
i have two arrays for every thing. one string, one integer. Weapons go Sword(0,0), Spear(1,0), Mace(2,0), ect. then the data for each one goes down from there. damage (0,0) speed (0,1) weight (0,2). you get the idea.
as far as i know every thing is set up correctly, save for this for/next loop i'm trying. it's the first time trying to make my own with out a tut to show me why mine didn't work. all i know is that putting the values to screen always returns 0
any one see any glaring flaws? or even minor ones.
thanks for let me take more of your time by reading this, and double thanks (that is worth more then a single thanks!) for any replies (even if they leave me more confused, i'm fumble my way from there.)
Anti
Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow