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

Condition not working for one trigger and working for an other

Status
Not open for further replies.
Level 2
Joined
Jun 19, 2016
Messages
26
Hello, i got a problem with my trigger and i cant solve it ( i didnt find the solution )

My WE is in french ( so its half english and french eh )

Visionneuse images - Noelshack - http://image.noelshack.com/fichiers/2017/23/7/1497199280-trigger-marche-pas.png

it's the one who dont work.

Visionneuse images - Noelshack - http://image.noelshack.com/fichiers/2017/23/7/1497199345-trigger-qui-marche.png

and this one is working perfectly.

I have the same event ( a unit owned by player 11 dg finish a construction )

and the same condition ( unit-type of (constructed structure)) equal to ( only the unit differ )

I dont understand why it doesnt work !

( if u need additional information just ask )
 
Level 21
Joined
Dec 4, 2007
Messages
1,478
In your first actions everything works right?

In your second actions, you are repeating the unitpicking of group "citoyen".

it should look like this:

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Move To (Center of (Playable map area))
When yours looks like this:

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Order (Picked unit) to Move To (Center of (Playable map area)))
but i'm not sure that fixes the issue tbh
 
Last edited:
Level 2
Joined
Jun 19, 2016
Messages
26
Hello, thanks for replying but in these trigger, actions are working. only condition in the first screen block the trigger ( i test with and without ).

The first screen it doesnt work ( the condition block ) and in the second everything is working but.. i have the same event and condition in these trigger.
 
Level 21
Joined
Dec 4, 2007
Messages
1,478
Well let me recreate your trigger then.

  • Untitled Trigger 001
    • Events
      • Unit - A unit owned by Player 1 (Red) Finishes construction
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructed structure)) Equal to (==) Farm
        • Then - Actions
          • Unit - Change color of (Triggering unit) to Blue
          • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
          • Unit Group - Add (Last created unit) to Xgroup
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (In-game time of day) Greater than or equal to (>=) 6.00
                • (In-game time of day) Less than (<) 16.00
              • Then - Actions
                • Unit Group - Pick every unit in Xgroup and do (Actions)
                  • Loop - Actions
                    • Unit - Order (Picked unit) to Move To (Random point in (Playable map area))
              • Else - Actions
        • Else - Actions
This works like it should on my end.
1st set of actions only work when building a farm. 2nd set of actions only work from 6-16 o clock.

Btw check for memory leaks, as seen in the hive's tutorial section.
Also post triggers in this format without the ": ["Trigger] ["/Trigger]
 
Level 2
Joined
Jun 19, 2016
Messages
26
God, thanks u helped me.. But now i have something i dont understand.. check my first screen :

constructed structure = constructeur 1 = doesnt work

In my second screen :

constructed structure = agriculteur 1 ( constructeur 1 and agriculteur 1 are both units, villager to be exact ) = it work..

do u know why ?
 
Level 21
Joined
Dec 4, 2007
Messages
1,478
Not quite sure what you mean, i just recreated your trigger and it does work.

Maybe you can share your map?
 
Level 2
Joined
Jun 19, 2016
Messages
26
Well i fixed the problem so i guess its ok.

I think i just dont understand something stupid but its ok u already solve the problem, thanks !
 
Status
Not open for further replies.
Top