In my actions, my Custom Script action has the code in the previous post, but this generated code has a if (!runActions) { ... } which is put before my variable declarations. I know variable declarations are supposed to be the first in the function, but I can't modify the text window that shows me this generated code. What should I do?
1. I figured out that there are such things as "point groups" that seem to be similar to my point array. I found how to get a unit out of a unit group, UnitGroupUnit(), but there's no PointGroupPoint(), or any PointGroup functions for that matter. Is there something I'm missing about point groups?
2. How did you know that 0 was okay for the third parameter in UnitCreate? Where can I find some information on what create style means?
3. The last parameter for UnitIssueOrder is int inQueueType. Where can I find a more indepth reference of the UnitIssueOrder function, so I can know that it's okay to put 0 in there?
4. Does my usage of abilCmd look right? It seems awkward that to do something as simple as attacking I need two intermediate objects like that.
5. I saw in that link that UnitCreate returned a unitgroup. In my catching of its return type, I declared a unitgroup. Is that a reference or a copy? In C that would be a copy and I'd probably be in trouble.
Hi all, I've been searching and experimenting for a while and I'm having trouble with the galaxy editor. Here's what I have so far:
constintarray_count=5;inti=0;int[array_count]t;t[0]=DataTableGetPoint(true,"Zombie Spawn 1");t[1]=DataTableGetPoint(true,"Zombie Spawn 2");t[2]=DataTableGetPoint(true,"Zombie Spawn 3");t[3]=DataTableGetPoint(true,"Zombie Spawn 4");t[4]=DataTableGetPoint(true,"Zombie Spawn 5");while(i<5){// Unit - Create 1 Zealot for player 15 at [hoping to use t[i] here] using default facing (No Options)// Unit - Order (Last created unit) to ( Attack targeting (Closest unit to (Position of (Last created unit)) in (Any units in (Entire map) owned by player Any Player matching Excluded: Self, with at most Any Amount))) (Replace Existing Orders)i+=1;}
The comments inside the while loop are what I'm having trouble with. Those comments came from actions, which I'm trying to translate into galaxy script.
My end goal here is to create one zealot at each of my points, and tell them to attack the nearest enemy unit. Can anyone help me out? There's so many things I'm lost on in this.
Thanks a bunch,
- Evan
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Thanks to everyone who helped me out with this, it works now, and I feel much more at home in the galaxy editor =)
Also, when I try to save, I get a syntax error on this code:
In my actions, my Custom Script action has the code in the previous post, but this generated code has a if (!runActions) { ... } which is put before my variable declarations. I know variable declarations are supposed to be the first in the function, but I can't modify the text window that shows me this generated code. What should I do?
Thanks,
- Evan
Wow, that link is a gold mine! Thank you so much!
1. I figured out that there are such things as "point groups" that seem to be similar to my point array. I found how to get a unit out of a unit group, UnitGroupUnit(), but there's no PointGroupPoint(), or any PointGroup functions for that matter. Is there something I'm missing about point groups?
2. How did you know that 0 was okay for the third parameter in UnitCreate? Where can I find some information on what create style means?
3. The last parameter for UnitIssueOrder is int inQueueType. Where can I find a more indepth reference of the UnitIssueOrder function, so I can know that it's okay to put 0 in there?
4. Does my usage of abilCmd look right? It seems awkward that to do something as simple as attacking I need two intermediate objects like that.
5. I saw in that link that UnitCreate returned a unitgroup. In my catching of its return type, I declared a unitgroup. Is that a reference or a copy? In C that would be a copy and I'd probably be in trouble.
Thanks so much for your help!
Hi all, I've been searching and experimenting for a while and I'm having trouble with the galaxy editor. Here's what I have so far:
The comments inside the while loop are what I'm having trouble with. Those comments came from actions, which I'm trying to translate into galaxy script.
My end goal here is to create one zealot at each of my points, and tell them to attack the nearest enemy unit. Can anyone help me out? There's so many things I'm lost on in this.
Thanks a bunch,
- Evan