Hi,
suppose you have an array, lets say it contains regions. If you have particular region which is also in the array, through triggering region or function parameter etc., can you get the index of that object (region in this case)?
You either have to save the index alongside it somehow (in the case of units the custom value is handy), or you have to iterate the array with "for each integer", and break when you hit "whatever[x] == your item".
Hi, suppose you have an array, lets say it contains regions. If you have particular region which is also in the array, through triggering region or function parameter etc., can you get the index of that object (region in this case)?
You either have to save the index alongside it somehow (in the case of units the custom value is handy), or you have to iterate the array with "for each integer", and break when you hit "whatever[x] == your item".
thanks, but i couldnt even try it out, my game kept crashing whenever a unit entered a region, it didnt even get the to the actions...