Is it possible to create 2 lists, one list with 5 ints(1-5) and the other list of 10 ints(1-10)? I don't know how to code this other than make 10 individual ints and 5 other individual ints. I need this type of structure so I can pick a random number from list one and two, multiply them together and use that value to take away health from enemy or player. Can anyone please help me? Thank you.
Edit: Also, how do I create a small array in AGS 2.61? I've searched but the code for each was questioning to me and I didn;t really understand it too much.
You can use arrays: http://www.adventuregamestudio.co.uk/manual/Arrays.htm
There is also an article in the Tech Archive: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23527.msg247166#msg247166
Quote from: Rap4Life42o on Mon 20/03/2006 20:01:46
Edit: Also, how do I create a small array in AGS 2.61? I've searched but the code for each was questioning to me and I didn;t really understand it too much.
int blah[12];
will make an array of 12 elements starting from blah[0] thru blah[11]. :P
So I could make two arrays, one with 5 indexes and one with 10, but how would I randomize through the numbers?
http://www.adventuregamestudio.co.uk/manual/Random.htm
int a[5];
int b[10];
//...
int c = a[Random(4)] + b[Random(9)];
Awesome! Now, I have to get the players fightingpower and defensepower. Would I use:
GetGlobalInt(1) which equals fightingpower
GetGlobalInt(2) which equals defensepower
Sorry for asking for so much, but I want the player to be able to adjust his stats using up and down arrows(to change numerical value of stats) while updating the code to get different results during battles. Thanks for all the help so far! :)