For context, I am experimenting with Eventing a Battle System and it is going pretty well, surprisingly.
As the title says, I am experimenting with storing information about weapons in an array. A piece of that information is a damage range for each weapon.
I have been trying to figure out how to take that damage range and assign it to a Variable, like a random value.
I have figured out a workaround, but it requires manually assigning the damage range based on the weapon being used, rather than reusing a Variable for whatever weapon is chosen.
So, for instance, the array contains the Weapon Type, Weapon Name, Weapon Damage Range (1-4, 1-6, 2-8, etc.), and the Critical Value for each weapon. Such as [1, "Dagger", 1-4, 4, 2, "Sword", 2-8, 8].
I allow the player to select a weapon to attack with, which sets Variables to the values of the applicable positions in the array.
But I can't figure out if I can actually pull a damage range from the array, like 1-8, and put that in a Variable as if I was making a Variable with a random number from 1-8.
Again, I can manually assign the damage range with Conditional Branches based on the Weapon Type. But I wanted to try to have a single Variable assigned to whatever damage range is applicable from the array to make the Eventing simpler.
I'm not sure if I am explaining this well.
Instead of setting Variable 5 to a Random Number from 1-8, I would like to set Variable 5 to the value of the damage range from the array.
But I am starting to wonder if you can even store information like that in an array. I am storing the value 1-8 for instance, but I am thinking there might not be a way to translate that into a Variable with a random value from 1-8.
I hope this makes sense and I appreciate any help that you can provide.
As the title says, I am experimenting with storing information about weapons in an array. A piece of that information is a damage range for each weapon.
I have been trying to figure out how to take that damage range and assign it to a Variable, like a random value.
I have figured out a workaround, but it requires manually assigning the damage range based on the weapon being used, rather than reusing a Variable for whatever weapon is chosen.
So, for instance, the array contains the Weapon Type, Weapon Name, Weapon Damage Range (1-4, 1-6, 2-8, etc.), and the Critical Value for each weapon. Such as [1, "Dagger", 1-4, 4, 2, "Sword", 2-8, 8].
I allow the player to select a weapon to attack with, which sets Variables to the values of the applicable positions in the array.
But I can't figure out if I can actually pull a damage range from the array, like 1-8, and put that in a Variable as if I was making a Variable with a random number from 1-8.
Again, I can manually assign the damage range with Conditional Branches based on the Weapon Type. But I wanted to try to have a single Variable assigned to whatever damage range is applicable from the array to make the Eventing simpler.
I'm not sure if I am explaining this well.
Instead of setting Variable 5 to a Random Number from 1-8, I would like to set Variable 5 to the value of the damage range from the array.
But I am starting to wonder if you can even store information like that in an array. I am storing the value 1-8 for instance, but I am thinking there might not be a way to translate that into a Variable with a random value from 1-8.
I hope this makes sense and I appreciate any help that you can provide.