I am new to programming in general and, by definition, to Construct as well. I am attempting to use Construct to build a prototype of a turn-based, 2D RPG. Made some progress but am running into a wall that I hope this forum can help with.
The combat is essentially a row of static monsters faced off against a row of static player characters. Each character (player or enemy) takes a turn in 'rounds'. At the completion of each round, the process starts over (quite original, I know...).
I am using an array to store data for each PC and enemy. For example: arrayPC1. I am now attempting to figure out how to construct an attack function that can be reused everywhere (seems pretty important for an RPG). The problem I am having is that I can't predict which 'slot' a character will choose to attack. So PC1 might decide to attack Enemy1, 2, or 3 and the correct array would need to referenced in the function in any of those cases. Here is a visual example to try and help explain:
<img src="http://i44.tinypic.com/fy34mg.jpg" border="0" />
So, how do I tell the function which of these slots to pull data from when it is calculating an attack?
Thanks in advance for helping out a noob...