• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger Diagnosis, Why isn't this working?

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2011
Messages
145
So, I'm working on a map that has an Age of Empires 3 inspired trade rout system. You build a trading post in a specific place and you gain control of a trade point. when the ship passes by the trade point, you get something from it. You either get Gold, Lumber, or a random item (Trinket). You switch what you receive by clicking it's corresponding button in the Trading Post's UI. Or at least that's what is supposed to happen. This trigger is proving to be very tedious. I'm on version 4 at the moment. The bug I'm encountering in this version is that switching to Trinket just doesn't work. I click it and it ends up just being a toggle between gold and lumber.

triggerlist.png


IMG_20200115_182939.jpg


I even tried a "Keep it simple stupid" trigger that just guts the abilities and re-applies them based on the cast abilities. and it just results in a blank UI. Anyway, if you have any idea why this isn't working or how to fix it please let me know, I can't seem to fix it.
 
Level 7
Joined
Dec 28, 2011
Messages
145
Alright, new problem. It now cycles Gold, Lumber, Trinkets, regardless of what button is pressed... which is better? I suppose? Ideally, It should switch to whatever trade good is picked. I'm starting to think that this is another "Gut-it and start over from scratch" situation.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Edit:
I misread your post and I think I know what you want now. I uploaded a map with an example.

You can have one of the three active at a time: Gold/Lumber/Trinket. Type "test" to get which ability is currently active.

Note: There is a small delay before Buffs are applied from Auras. This delay will cause problems when checking to see if your Trade Outpost has a specific buff. So rather than using "Unit has specific buff" to check which ability is active on your Trade Outpost you want to use "Level of ability for Unit" instead.

Like I do in my test trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of TO_ActiveAbil[1] for Paladin 0000 <gen>) Equal to 1
    • Then - Actions
      • Game - Display to (All players) for 30.00 seconds the text: Collect Gold
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of TO_ActiveAbil[2] for Paladin 0000 <gen>) Equal to 1
        • Then - Actions
          • Game - Display to (All players) for 30.00 seconds the text: Collect Lumber
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of TO_ActiveAbil[3] for Paladin 0000 <gen>) Equal to 1
            • Then - Actions
              • Game - Display to (All players) for 30.00 seconds the text: Collect Trinket
            • Else - Actions
So whenever the Ship passes by your Trade Outpost you can check to see which Ability is active by using the method above and add the corresponding resources.
 

Attachments

  • Trade Outpost v.2.w3x
    19.3 KB · Views: 17
Last edited:
Status
Not open for further replies.
Top