• 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.

[General] Big world editor problem. - Random trigger malfunctioning

Status
Not open for further replies.
Level 2
Joined
Sep 17, 2012
Messages
11
I use the normal World Editor for Warcraft III editing, and more and more I notice that triggers that I wrote, that worked the day before as they were, once I make minor changes to them that should not alter their whole structure, don't work the day after.

Is this a common bug under World Editor? Is there a fix? Triggers that seem perfectly fine just don't act as they are supposed to act.

-FOR EXAMPLE-
  • Events -
    • A unit acquires an object
  • Conditions -
    • Conditions (any are true)
      • (Item being manipulated) equal to (steel plate)
  • Actions -
    • Set movement speed for (triggering unit) to (movement speed of (triggering unit)/1.25)
This doesn't work. And before, it did.
 
Level 2
Joined
Sep 17, 2012
Messages
11
It seems to revolve around the triggers I've created to determine unit movement speed when heavy objects are being manipulated. It's a sort of "This is a heavy object so it makes you move slower" thing.
Here's the triggers, for Weight -in- and weight -out- respectively;

  • WeightIn
  • Events -
    • Unit acquires an object
  • Conditions -
  • Actions -
    • If (all conditions are true) then (actions) else (else actions)
      • Conditions -
        • (Hero manipulating Item) is equal to Dwarf Champion
        • (Hero manipulating Item) is equal to Dwarf Runecaster
        • (Hero manipulating Item) is equal to Dwarf Troll slayer
      • Then -
        • Do nothing
      • Else -
        • If (all conditions are true) then (actions) else (else actions)
          • Conditions -
            • Or - Any (Conditions) are true
              • Conditions -
                • Item-type of (Item being manipulated) equal to Steel armor
                • Item-type of (Item being manipulated) equal to Great axe
                • Item-type of (Item being manipulated) equal to Plate armor
                • Item-type of (Item being manipulated) equal to Great bow
          • Then -
            • Set (Hero manipulating item) movement speed to (Current movement speed of (Hero manipulating item)/1.25)
          • Else -
            • Do nothing
  • WeightOut
  • Events -
    • Unit acquires an object
  • Conditions -
  • Actions -
    • If (all conditions are true) then (actions) else (else actions)
      • Conditions -
        • (Hero manipulating Item) is equal to Dwarf Champion
        • (Hero manipulating Item) is equal to Dwarf Runecaster
        • (Hero manipulating Item) is equal to Dwarf Troll slayer
      • Then -
        • Do nothing
      • Else -
        • If (all conditions are true) then (actions) else (else actions)
          • Conditions -
            • Or - Any (Conditions) are true
              • Conditions -
                • Item-type of (Item being manipulated) equal to Steel armor
                • Item-type of (Item being manipulated) equal to Great axe
                • Item-type of (Item being manipulated) equal to Plate armor
                • Item-type of (Item being manipulated) equal to Great bow
          • Then -
            • Set (Hero manipulating item) movement speed to (Current movement speed of (Hero manipulating item)*1.25)
          • Else -
            • Do nothing
There are no variables concerned in these triggers.

Since I'm using an Item-Level based Item Drop System (so that you can't wield two weapons, two shields, etc), I thought I could change the levels of certain armors and weapons, and then use the level for heavy armors and weapons to use it in the trigger, as it seems more stable. Although, if I do that, I wouldn't known how to make it impossible for the player to pick up two sets of armor, such as one heavy, one light, as the armors would have different item levels.
 
Last edited:
Level 2
Joined
Sep 17, 2012
Messages
11
Like, sorts of debug messages? How would I go about on doing that?
That'd really help me for those triggers I can't manage to do.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Place a Game->Text Message in all the branches and at the start of the trigger with Text being an appropiate message to let you tell how the trigger flows. It is not as good as a true debugger like you use when making real programs but still effective enough to tell what happens and spot bugs. Only thing you have to remember is to delete the message actions after you are satisfied the trigger functions as intended as you do not want random players of your map having their experience interfeared by them.
 
Level 2
Joined
Sep 17, 2012
Messages
11
Oh, zing. I am such an idiot.
It was actually a very simple problem.
The two events for weightin, weightout were "a unit acquires an object". And weightout needed to have "a unit loses an object".
I don't know if I'll ever forgive myself for this.

Thank you anyway for your time, at least I found out a way to check my triggers.
 
Status
Not open for further replies.
Top