2-Dimensional variables [SOLVED]
Posted: Tue Jan 13, 2015 10:02 am
I want to use the variables a(1) to a(8) and b(1) to b(8) in the console line, but I keep failing:
Or do something similar with setBaseStat.
Is it possible to use 2-dimensional variables like this?
UPDATED: Thanks the below comments the format should be
I have an idea for a puzzle as follows:
There are 2 patchs to choose. The left one looks very dangerous with lots ranged mobs that can't get in melee range. The right looks easy with a few melee mobs. Depending on your decision I want to change either skills or stats (not sure right now what works best). So, first I read and store your skill/stat level. Then I either boost (right path) or decrease (easy path) them. If you survive I give your original skill/stat level back. If you choose the 'right' path, which would be the hard looking one, you gain 2 skill/stat points. But if you took the 'easy' path I would randomly decrease 2 skill/stats -1. Basically you are blessed or cursed. But you can redeem yourself by placing a valuable item in an alcove to get the decrease undone.
How everything is scripted exactly might be a different topic discussion. With 2-dimensional variables it makes it easier.
Code: Select all
a[1]="alchemy" a[2]="firearms" ect.
b[1]=5 b[2]=3 etc.
for ii=1,8 do for i=1,4 do party.party:getChampion(i):trainSkill(a[ii],b[ii]) end end
a={[1]="alchemy", [2]="firearms" etc.}
b={[1]=5, [2]=3 etc.}
for ii=1,8 do for i=1,4 do party.party:getChampion(i):trainSkill(a[ii],b[ii]) end end
Is it possible to use 2-dimensional variables like this?
UPDATED: Thanks the below comments the format should be
Code: Select all
a={"alchemy","firearms" etc.} and b={5,3 etc.}There are 2 patchs to choose. The left one looks very dangerous with lots ranged mobs that can't get in melee range. The right looks easy with a few melee mobs. Depending on your decision I want to change either skills or stats (not sure right now what works best). So, first I read and store your skill/stat level. Then I either boost (right path) or decrease (easy path) them. If you survive I give your original skill/stat level back. If you choose the 'right' path, which would be the hard looking one, you gain 2 skill/stat points. But if you took the 'easy' path I would randomly decrease 2 skill/stats -1. Basically you are blessed or cursed. But you can redeem yourself by placing a valuable item in an alcove to get the decrease undone.
How everything is scripted exactly might be a different topic discussion. With 2-dimensional variables it makes it easier.