Hi,
I'm working on a game with a level editor. In this level editor you can create level tiles and enemies, which are stored in a 3-dimensional array (tiles on Z=1, enemies on Z=2). The enemies are stored as a string, e.g. "1", "2", "3', etc, so when loading the level, I can create them as an active object using their name. So a fastloop reading through the array and creating the enemies through CreateStr$(ValueAtXYZ"Array"). It then creates the enemy that is stored in the current position of the Array, e.g. enemy 1, 2, 3, etc.
I would like to store specific enemy behaviours in the same X,Y position of the array, but then in Z=3 (vs Z=2 where the enemy type is stored). This way, I can use one enemy type, but have different characteristics stored in Z=3. For example the amount of life. So if an enemy from Z=2 in the array is loaded, that when creating this enemy, at the same time it loads the value from Z=3 and assigns this to Alterable Value A (which is used for enemy life points).
I've tried to do this directly when creating the enemy and then Assigning Alt.Variable A of group Enemies to ArrayX,Y,Z=3 , but what happens is that ALL enemies are affected, instead of the object (enemy) that was just created using the CreateStr$(ValueAtXYZ"Array") function.
So my question is: how I could assign specific values to a specific object created using string name? Hope this is possible, thanks!