• 🏆 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!

Whats wrong this (these) triggers?

Status
Not open for further replies.
Level 4
Joined
Jun 9, 2005
Messages
49
Once I start up my map, none of the ground units can move, so I removed my most recently added trigger bunch, then played it, it worked perfectly, so whats wrong with them?

Theres about 11 other types of the same trigger (Fighter(colour)Slave(colour)Villager(Colour)
-------
FightersRed
Events
Unit - A unit enters (Entire map)
Conditions
(Owner of (Entering unit)) Equal to Player 1 (Red)
(Unit-type of (Entering unit)) Equal to Legionare
(Unit-type of (Entering unit)) Equal to Recruit
(Unit-type of (Entering unit)) Equal to Hoplite
(Unit-type of (Entering unit)) Equal to Spearman
(Unit-type of (Entering unit)) Equal to Hastati
(Unit-type of (Entering unit)) Equal to Falcata
(Unit-type of (Entering unit)) Equal to Archer
(Unit-type of (Entering unit)) Equal to Triarii
(Unit-type of (Entering unit)) Equal to Arcus
Actions
Unit Group - Add (Entering unit) to FighterRed
------
VillagerRed
Events
Unit - A unit enters (Entire map)
Conditions
(Owner of (Entering unit)) Equal to Player 1 (Red)
(Unit-type of (Entering unit)) Equal to Villager
Actions
Unit Group - Add (Entering unit) to VillagerRed
-----
SlaveRed
Events
Unit - A unit enters (Entire map)
Conditions
(Owner of (Entering unit)) Equal to Player 1 (Red)
(Unit-type of (Entering unit)) Equal to Slave
Actions
Unit Group - Add (Entering unit) to SlaveRed
----

And the Variables all look the same, just a name, a empty unit-group with no array. So whats wrong?

P.S:
You may notice im not the greatest triggerer in the land.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
First, use the Trigger tags. [trigger*] df [/trigger*] without the *.
  • FightersRed
  • Events
    • Unit - A unit enters (Entire map)
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • (Unit-type of (Entering unit)) Equal to Legionare
    • (Unit-type of (Entering unit)) Equal to Recruit
    • (Unit-type of (Entering unit)) Equal to Hoplite
    • (Unit-type of (Entering unit)) Equal to Spearman
    • (Unit-type of (Entering unit)) Equal to Hastati
    • (Unit-type of (Entering unit)) Equal to Falcata
    • (Unit-type of (Entering unit)) Equal to Archer
    • (Unit-type of (Entering unit)) Equal to Triarii
    • (Unit-type of (Entering unit)) Equal to Arcus
  • Actions
    • Unit Group - Add (Entering unit) to FighterRed
Should be changed to

  • FightersRed
  • Events
    • Unit - A unit enters (Entire map)
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • Or (Any of these Conditions)
      • (Unit-type of (Entering unit)) Equal to Legionare
      • (Unit-type of (Entering unit)) Equal to Recruit
      • (Unit-type of (Entering unit)) Equal to Hoplite
      • (Unit-type of (Entering unit)) Equal to Spearman
      • (Unit-type of (Entering unit)) Equal to Hastati
      • (Unit-type of (Entering unit)) Equal to Falcata
      • (Unit-type of (Entering unit)) Equal to Archer
      • (Unit-type of (Entering unit)) Equal to Triarii
      • (Unit-type of (Entering unit)) Equal to Arcus
  • Actions
    • Unit Group - Add (Entering unit) to FighterRed
If you run it as them all plain (like in the first trigger) then that unit will have to equal ALL of those units, not just one of them.
 
Level 4
Joined
Jun 9, 2005
Messages
49
First, use the Trigger tags. [trigger*] df [/trigger*] without the *.
  • FightersRed
  • Events
    • Unit - A unit enters (Entire map)
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • (Unit-type of (Entering unit)) Equal to Legionare
    • (Unit-type of (Entering unit)) Equal to Recruit
    • (Unit-type of (Entering unit)) Equal to Hoplite
    • (Unit-type of (Entering unit)) Equal to Spearman
    • (Unit-type of (Entering unit)) Equal to Hastati
    • (Unit-type of (Entering unit)) Equal to Falcata
    • (Unit-type of (Entering unit)) Equal to Archer
    • (Unit-type of (Entering unit)) Equal to Triarii
    • (Unit-type of (Entering unit)) Equal to Arcus
  • Actions
    • Unit Group - Add (Entering unit) to FighterRed
Should be changed to

  • FightersRed
  • Events
    • Unit - A unit enters (Entire map)
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • Or (Any of these Conditions)
      • (Unit-type of (Entering unit)) Equal to Legionare
      • (Unit-type of (Entering unit)) Equal to Recruit
      • (Unit-type of (Entering unit)) Equal to Hoplite
      • (Unit-type of (Entering unit)) Equal to Spearman
      • (Unit-type of (Entering unit)) Equal to Hastati
      • (Unit-type of (Entering unit)) Equal to Falcata
      • (Unit-type of (Entering unit)) Equal to Archer
      • (Unit-type of (Entering unit)) Equal to Triarii
      • (Unit-type of (Entering unit)) Equal to Arcus
  • Actions
    • Unit Group - Add (Entering unit) to FighterRed
If you run it as them all plain (like in the first trigger) then that unit will have to equal ALL of those units, not just one of them.

Ok great, but that hasn't fixed the problem... I've done what you've recomended, but when I activate those triggers (I've turned em off when Im doing other tests) all the units are unable to move, and if there spawned they'll all spawn on top of each other.
 
Level 8
Joined
Feb 20, 2007
Messages
338
Yes. Yes. and Yes again. But let me explain why this is so.

When you have just a list of conditions the program reads it all as AND.

Thus its waiting for a unit with ALL of those conditions in your FightersRed. since there is no way to have a unit that is all of those units that trigger will never fire.

  • Or - Any (Conditions) are true
    • Conditions
Will read each and every condition, thus a unit with only one of those conditions will cause the trigger to fire. Thus when a Legionare enters the map the trigger will check to see what kind of 'or' unit you have.

With the
  • (Owner of (Entering unit)) Equal to Player 1 (Red)
being before

  • Or - Any (Conditions) are true
    • Conditions
The program reads it that Owner of entering unit...(red) AND one of your 'or conditions.'

Another thing you might want to do is use
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions

It is under actions.

Thus you can have only one trigger for each of these and add by team color to specific unit groups.

as EXAMPLE:

  • FightersRed
  • Events
  • Unit - A unit enters (Entire map)
  • Conditions
  • Or - Any (Conditions) are true
    • Conditions
  • (Unit-type of (Entering unit)) Equal to Legionare
  • (Unit-type of (Entering unit)) Equal to Recruit
  • (Unit-type of (Entering unit)) Equal to Hoplite
  • (Unit-type of (Entering unit)) Equal to Spearman
  • (Unit-type of (Entering unit)) Equal to Hastati
  • (Unit-type of (Entering unit)) Equal to Falcata
  • (Unit-type of (Entering unit)) Equal to Archer
  • (Unit-type of (Entering unit)) Equal to Triarii
  • (Unit-type of (Entering unit)) Equal to Arcus
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
  • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • Then - Actions
    • Unit Group - Add (Entering unit) to FighterRed
      • Else - Actions
  • Do nothing
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
  • (Owner of (Entering unit)) Equal to Player 2 (Blue)
    • Then - Actions
    • Unit Group - Add (Entering unit) to FighterBlue
      • Else - Actions
  • Do nothing
I'm making the assumption you have FighterX (where x is a color) as your variable names.

This way instead of having 12 triggers one for each team, you can have only one trigger that checks the unit type in your OR conditions.


Since you have unit groups you might have leaks in your map.

This is the first thing covered in the sticky thread "Things that Leak" found here: http://www.hiveworkshop.com/forums/f269/things-leak-35124/

As for why these are not moving, unknown - what are you doing with your unit groups? Do you have a trigger command in there to pause all units in X_Unit_Group (your unit group variable) somewhere and are not un-pausing them?

Are you changing animation somewhere? There is a lot of nooks and crannies in trigger making.
 
Status
Not open for further replies.
Top