What I want to do, is to make the computer (Player 9) to attack-move to random enemy players, like tag maps in WC3.
It would be awesome if anyone could remake this code for Galaxy Editor;
Player Group - Pick every player in (All enemies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type Hunter) and do (Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Picked player))))))
that trigger fail itself, when you pick the players (1,2,3,4,5,6,7,8,9,10,12 and so on) and have the attack picked player again, then you are going to attack youself.....
but i think this will do the job
Actions
Player Group - Pick each player in (Enemies of player 11) and do (Actions)
Actions
Unit Group - Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Order (Picked unit) to ( Attack targeting (Random Living unit from (Any units in (Entire map) owned by player 11 matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) (Replace Existing Orders)
Actions
Player Group - Pick each player in (Enemies of player 11) and do (Actions)
Actions
Unit Group - Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Order (Picked unit) to ( Attack targeting (Random Living unit from (Any units in (Entire map) owned by player 11 matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) (Replace Existing Orders)
I can't find the right action for: "Unit Group - Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)" :\
Could you explain where I can find it? Or upload a sample map or something? I really can't find it >_<
EDIT1: Tbh, I'm not able to make this myself, I'm only able to create the "Player Group - Pick each player in (Enemies of player X) and do (Actions)".
Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
FIrst find "Pick each unit in unit group"
Then whe it asks for unit group , select function, pick "units in region matching condition"
then fill in the blanks
Rollback Post to RevisionRollBack
Random Information
Tutorials - Map Development - Galaxy wiki
|Issues? PM me|
One thing tho... I can't find out how to choose Hunter as Unit type.
I'm a total noob, I know, I've tried for awhile now but I can't figure out how you did that. >_<
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Heya!
What I want to do, is to make the computer (Player 9) to attack-move to random enemy players, like tag maps in WC3. It would be awesome if anyone could remake this code for Galaxy Editor;
Player Group - Pick every player in (All enemies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type Hunter) and do (Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Picked player))))))
I tried to do it myself, but I failed..
- todds
that trigger fail itself, when you pick the players (1,2,3,4,5,6,7,8,9,10,12 and so on) and have the attack picked player again, then you are going to attack youself.....
but i think this will do the job
Actions
Player Group - Pick each player in (Enemies of player 11) and do (Actions)
Actions
Unit Group - Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Order (Picked unit) to ( Attack targeting (Random Living unit from (Any units in (Entire map) owned by player 11 matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) (Replace Existing Orders)
@JacobNielsen: Go
Ty for the fast and good answer! I will test this asap!
I can't find the right action for: "Unit Group - Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)" :\
Could you explain where I can find it? Or upload a sample map or something? I really can't find it >_<
EDIT1: Tbh, I'm not able to make this myself, I'm only able to create the "Player Group - Pick each player in (Enemies of player X) and do (Actions)".
@toddii: Go
Pick each unit in ((Unit type of Hunter) units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
FIrst find "Pick each unit in unit group"
Then whe it asks for unit group , select function, pick "units in region matching condition"
then fill in the blanks
@Molsterr: Go
Thanks for helping me out here guys, really!
One thing tho... I can't find out how to choose Hunter as Unit type.
I'm a total noob, I know, I've tried for awhile now but I can't figure out how you did that. >_<