- Joined
- Nov 3, 2005
- Messages
- 103
Hey, I've been trying to create a point capture system for nine points in total and I've been running into problems. I could actually do the entire thing without help, but I don't feel like copying and editing each piece of code for each point being captured nine times over.
I have a couple of variables set up to indicate the arrays of each Capture Point unit, the heroes within the distance of the points, and other important variables which I've assigned at the map's initialization event.
I'm also running periodic events to show whether or not the hero is in one of the groups I've created.
As an example of what my issue is:
I'm running a code which creates the special effect at the picked unit's origin during a periodic event.
Unit Group - Pick every unit in Point_Heroes_TeamA[(Integer A)] and do (Actions) - create the effect for picked unit
I want the game to loop the argument for all the arrays from 0 through 9 without having to copy the script 9 times and change the array for each time.
I've heard Integer A as something to do with this, not sure if that's true or not.
Edit: Never mind, I found it out. Have a different question though, of course. How would you check how many units are in a unit group?
I have a couple of variables set up to indicate the arrays of each Capture Point unit, the heroes within the distance of the points, and other important variables which I've assigned at the map's initialization event.
I'm also running periodic events to show whether or not the hero is in one of the groups I've created.
As an example of what my issue is:
I'm running a code which creates the special effect at the picked unit's origin during a periodic event.
Unit Group - Pick every unit in Point_Heroes_TeamA[(Integer A)] and do (Actions) - create the effect for picked unit
I want the game to loop the argument for all the arrays from 0 through 9 without having to copy the script 9 times and change the array for each time.
I've heard Integer A as something to do with this, not sure if that's true or not.
Edit: Never mind, I found it out. Have a different question though, of course. How would you check how many units are in a unit group?
Last edited: