• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help Move Units

Status
Not open for further replies.
Level 3
Joined
Mar 7, 2010
Messages
29
Hi I m trying to create a map but i dont know this:

how i do somethings (i m too noob i can use a bit the triggers and if the command isn't a triggers teach me ad do it) thet when i write ex:center or i press an icon all unit go to center?
see:starcraft zone control
 
Level 6
Joined
Jan 31, 2009
Messages
166
Your grammar makes your request for help a bit difficult to understand. But from what I can understand you are asking for a mass attack system. I do not have my world editor handy but here is a basic outline of the code in Gui.

first if you haven't already I suggest you read a few tutorials or you wont understand what I am saying.

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basics-triggers-32113/

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basic-memory-leaks-5889/

Event - whatever you want if you want it to be based of of a player typing "-attack" then you must use player event - chat message set the chat message to "-attack" and the player to red then copy it for each player the trigger must work for and change red to that player.

Conditions - None are necessary in this case

Actions - Set a Unit Group variable equal to all units controlled by the triggering player to prevent leaks.

Set a Point variable equal to the target eg the center of the map (also to avoid leaks)

Use a for each unit in group do multiple actions event.
Order picked unit to attack temp point

outside of the loop

use custum script call RemoveLocation(udg_TempPoint) and custum script call DestroyGroup(udg_TempGroup) (This assumes you named your point variable TempPoint and your group variable TempGroup)

I believe that is all but I cant test it because my computer with wc3 installed is currently under repairs.

Hope that helps
 
Level 5
Joined
Dec 13, 2008
Messages
141
Hi I m trying to create a map but i dont know this:

how i do somethings (i m too noob i can use a bit the triggers and if the command isn't a triggers teach me ad do it) thet when i write ex:center or i press an icon all unit go to center?
see:starcraft zone control

Translating Horrible Grammar: How do you make all of your units in one region (Or in one unit group) be moved to another location? In this case, the center of the map or something.

Reminding you of the old days of Drug Dealer, or drug wars, or w/e that map was called, where you had a drug dealer and there was a few or 1 policeman guarding their town from drugs, and the policeman sends units to attack druggies, a mass of units would be bad to control, so it works as a Trigger-Move Units control.
 
Level 9
Joined
Jun 25, 2009
Messages
427
Hi I m trying to create a map but i dont know this:

how i do somethings (i m too noob i can use a bit the triggers and if the command isn't a triggers teach me ad do it) thet when i write ex:center or i press an icon all unit go to center?
see:starcraft zone control

Actually i thought about it yesterday, and i think you should create a dummy for yourself (not from a worker) put invulnerable, locust, .mdl, 0 sight range, then just.
  • Move
    • Events:
      • Player - Player 1 (Red) writes -green as an exact match
    • Conditions:
    • Actions:
      • Set Green_Base=(Position of Dummy 0150 <gen>)
      • Set Unit_Group=(Units in playable map area) owned by (Triggering Player)
      • Unit Group - Pick (all units) in Unit_Group and (do actions):
        • Unit - Order (Picked Unit) to Attack-Move (Green_Base)
      • Custom script: call RemoveLocation(udg_Green_Base)
      • Custom script: call DestroyGroup(udg_Unit_Group)
And if this works only one time, then create a trigger that has event 0.01 game time, set Green_Base to position of that dummy, and don't remove it, because it will be permanent.

Hope this is the case.

Tiche3:grin:
 
Level 5
Joined
Dec 13, 2008
Messages
141
  • Move
    • Events:
      • Player - Player 1 (Red) writes -green as an exact match
    • Conditions:
    • Actions:
      • Set Green_Base=(Position of Dummy 0150 <gen>)
      • Set Unit_Group=(Units in playable map area) owned by (Triggering Player)
      • Unit Group - Pick (all units) in Unit_Group and (do actions):
        • Unit - Order (Picked Unit) to Attack-Move (Green_Base)
      • Custom script: call RemoveLocation(udg_Green_Base)
      • Custom script: call DestroyGroup(udg_Unit_Group)

Or you can do something like this:

  • MOVEMENT TO BLUE
  • Events
  • Player 1(Red) types -ablue as an exact match
  • Conditions
  • Actions
  • Unit Group - Pick every unit in (Units owned by Player 1(red) matching (Matching Unit is(A peon)) equal to false)
  • do (Unit - Move picked unit to Green Reg<001>)
I mean, something like that
 
Level 9
Joined
Jun 25, 2009
Messages
427
Or you can do something like this:

  • MOVEMENT TO BLUE
  • Events
  • Player 1(Red) types -ablue as an exact match
  • Conditions
  • Actions
  • Unit Group - Pick every unit in (Units owned by Player 1(red) matching (Matching Unit is(A peon)) equal to false)
  • do (Unit - Move picked unit to Green Reg<001>)
I mean, something like that

Technicaly, yes but it's not MPI and yesterday i fixed this problem on skype with the requester. :)
Anyway, your thing would be 8 triggers ( 8 players map ) and my way is very short, simple, leakless, MPI, GUI, epic ;D

EDIT: Yahoo!!! 150 posts ;p

Tiche3:grin:
 
Status
Not open for further replies.
Top