• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Moving unit instantly while checking 2 things impossible?

Status
Not open for further replies.
Level 5
Joined
Aug 18, 2013
Messages
85
  • Unit Group - Pick every unit in (Units in mongolgoback <gen> matching (((Owner of Diplomacy 0063 <gen>) Equal to (Picked player)) and ((Unit-type of (Picked unit)) Equal to Pikeman))) and do (Unit - Move (Picked unit) instantly to (Center of mongol spawn <gen>))
This trigger doesn't work.

How do you make a Unit Group trigger where it

1)Checks if a player owns a building
2)Also only selects units in a certain region owned by that player
3)Sends units matching the conditions of 1 and 2 to a certain area


Is this possible?
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
i don't mean to be harsh or something but i think you should learn about trigger editor from very start (i mean basic)
and read the note under the... err, you know the window which pops up when you click on it... err, damn i don't know what's the name, lol..
someone help me xD
 
Level 5
Joined
Aug 18, 2013
Messages
85
You don't pick any player...

That's impossible

There is no name don't worry.
Don't write Picked Player outside of a Pick every player and do actions.

I can not "pick nothing" because I had to put two conditions in it. Since...the original pick every player doesn't allow more than one check.

Or I just don't know how to pick nothing.

My trigger checks

1) The region where the units are
2) The type of unit that it is
3) The current controller of the base

I'm guessing there's another way this can be done or is it impossible?
 
Level 5
Joined
Aug 18, 2013
Messages
85
Post your whole trigger if you want me to help :)

  • Unit - A unit enters GREEN <gen>
  • Conditions
    • ((Unit-type of (Triggering unit)) Equal to DeclarewarMongol) and ((Owner of (Triggering unit)) Equal to (Owner of Diplomacy 0063 <gen>))
    • (Diplomacy 0047 <gen> belongs to an ally of (Owner of (Triggering unit))) Not equal to True
    • (Owner of Diplomacy 0047 <gen>) Not equal to (Owner of (Triggering unit))
  • Actions
    • Game - Display to (All players) the text: Genghis Khan of The...
    • Unit - Remove (Triggering unit) from the game
    • Wait 1.00 seconds
    • Sound - Stop music Immediately
    • Sound - Stop the currently playing music theme
    • Sound - Play beta_battle01 <gen>
    • Wait 0.20 seconds
  • Unit Group - Pick every unit in (Units in mongolgoback <gen> matching (((Owner of Diplomacy 0063 <gen>) Equal to (Picked player)) and ((Unit-type of (Matching unit)) Equal to Pikeman))) and do (Unit - Move (Matching unit) instantly to (Center of mongol spawn <gen>))
  • Unit Group - Pick every unit in (Units in greengoback <gen> matching (((Owner of Diplomacy 0047 <gen>) Equal to (Picked player)) and ((Unit-type of (Matching unit)) Equal to Pikeman))) and do (Unit - Move (Picked unit) instantly to (Center of green spawn <gen>))
    • Camera - Pan camera for Player 11 (Dark Green) to (Center of mongol spawn <gen>) over 0.00 seconds
    • Camera - Pan camera for Player 7 (Green) to (Center of green spawn <gen>) over 0.00 seconds
    • Camera - Pan camera for Player 6 (Orange) to (Center of green spawn <gen>) over 0.00 seconds
    • Unit Group - Pick every unit in (Units in battle area <gen>) and do (Unit - Make (Picked unit) Vulnerable)
    • Camera - Set the camera bounds for Player 11 (Dark Green) to battle area <gen>
    • Camera - Set the camera bounds for Player 7 (Green) to battle area <gen>
    • Camera - Set the camera bounds for Player 6 (Orange) to battle area <gen>
    • Player - Make Player 11 (Dark Green) treat Player 6 (Orange) as an Enemy with shared vision
    • Player - Make Player 7 (Green) treat Player 6 (Orange) as an Enemy with shared vision
    • Player - Make Player 6 (Orange) treat Player 7 (Green) as an Enemy with shared vision
    • Player - Make Player 6 (Orange) treat Player 11 (Dark Green) as an Enemy with shared vision
    • Trigger - Turn on greenchallengedg <gen>
    • Trigger - Turn on dgchallengegreen <gen>
    • Trigger - Turn on retreat dg <gen>
    • Trigger - Turn on retreat green invaded <gen>
    • Wait 1.00 seconds
    • Unit Group - Pick every unit in (Units in pause <gen>) and do (Unit - Pause (Picked unit))
 
Level 5
Joined
Aug 18, 2013
Messages
85
first change your pick every unit block to multiple units, then i and malhorne will help you start from there to make it easier

>(Units in greengoback <gen>

>(((Owner of Diplomacy 0047 <gen>)

>((Unit-type of (Matching unit)) Equal to Pikeman)))

>(Unit - Move (Matchin Unit) instantly to (Center of))

How do I divide these into multiple units?

I think they're only available in pick every unit T_T
 
Level 5
Joined
Aug 18, 2013
Messages
85
  • Unit Group - Pick every unit in (Units in greengoback <gen> owned by (Owner of Gorgonak River 0006 <gen>)) and do (Actions)
    • Loop - Actions
      • If ((Unit-type of (Picked unit)) Equal to Pikeman) then do (Unit - Move (Picked unit) instantly to (Center of green spawn <gen>)) else do (Do nothing)
Thanks guys it works
 
Level 5
Joined
Aug 18, 2013
Messages
85
err, can you use multiple 'ITE'? because 'do nothing' action is a horrible action
it's slowing your progress

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Picked unit)) Equal to Heavy Infantry
    • Then - Actions
    • Else - Actions
Would changing to Multiple ITE really help? What if all the conditions are not true? Like I don't have a picked unit equal to Pikeman in my army, but I have a Heavy Infantry. Would it not work?

The only reason I have my triggers like this is because I don't want it to transport buildings I own to the battlefield screen.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Picked unit)) Equal to Heavy Infantry
    • Then - Actions
    • Else - Actions
Would changing to Multiple ITE really help? What if all the conditions are not true? Like I don't have a picked unit equal to Pikeman in my army, but I have a Heavy Infantry. Would it not work?

The only reason I have my triggers like this is because I don't want it to transport buildings I own to the battlefield screen.

Changing to Mutiple ITE is greater than a single ITE because you can set multiple conditions at it and also multiple actions as what the name implies also to answer your question, if a condition is not true I just suggest put it in the Else - Action because ITE works like this. Condition and if condition is met, it will do the actions at the Then and Else if it didnt met it.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Exactly, nice explanation and actually Do Nothing can just be exchanged with no trigger like leaving the Else blank. If you will actually read tutorial, Do Nothing just takes up space which should not be if you are aiming for an efficient trigger.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Also please use this to post your triggers http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

And please use hidden tags when triggers stretch the page.

Another note. When using a unit group with a ton of matching unit conditions instead pick all units in the area and filter out the units using an ITE. That way you can set picked unit to a variable before the ITE and use it in the ITE conditions for speed efficiency and easier modifying of conditions.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
The GUI is not a scripting language, JASS is the scripting language, the GUI is the interface of JASS. Just clarifying.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I just wanted to clarify it, someone stated that the GUI is a language.
Malhorn wrote:
It is a window and the language is GUI ;)
Anyway, I am sorry for bringing this up, since it is truly irrelevant to the topic being discussed.
 
Status
Not open for further replies.
Top