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

Charge Gold and Lumber issues

Status
Not open for further replies.
Level 15
Joined
Jan 27, 2007
Messages
948
You have to show a screenshot of what you have done. Your problem is because you are doing something wrong. For us to see what have you done wrong, we need a screenshot. Regarding triggers might also help, for instance maybe you made a trigger to research certain technology hence why the game "ignores" the requirements, because they are fulfilled.

BTW, he was pretty clear guys, there is an ability (default ability) called "Chage gold and lumber", he meant to add a requirement for use and he says that despite the fact that he added the requirement under Techtree - Requirements (in object editor), ingame the requirements are ignored.
 
Level 12
Joined
May 22, 2015
Messages
1,051
There is an ability called "Charge Gold and Lumber". It is an ability that can have resource costs (instead of mana costs).

He wants his custom version of this ability to have tech tree requirements. He added some, but they didn't seem to work.

That is what he is trying to say.

Anyway, try checking if the "Check Tech Requirements" field is set to "false". That would cause it to ignore any tech requirements you specify. Showing a screenshot of your ability in the object editor would definitely help people see the problem.
 
Level 15
Joined
Jan 27, 2007
Messages
948
You have other options aswell. For example in my map I have a market, which has an ability based on "Item Temporary Speed Bonus" and three other similar abilities, which sells lumber for gold.
It's very important that you do not use the same base skill for the same unit, or it will share cooldown.

Here's the trigger in case you'd like to use it or peek and learn something.

  • Sell Resources
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Sell Resources (10/5)
          • (Ability being cast) Equal to Sell Resources (100/50)
          • (Ability being cast) Equal to Sell Resources (1000/500)
          • (Ability being cast) Equal to Sell Resources (10000/5000)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Sell Resources (10/5)
          • ((Owner of (Triggering unit)) Current lumber) Greater than or equal to 10
        • Then - Actions
          • Player - Add -10 to (Owner of (Triggering unit)) Current lumber
          • Player - Add 5 to (Owner of (Triggering unit)) Current gold
          • Sound - Play ReceiveGold <gen> at 100.00% volume, attached to (Triggering unit)
          • Floating Text - Create floating text that reads |cffffd700+5|r above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 48.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Sell Resources (100/50)
              • ((Owner of (Triggering unit)) Current lumber) Greater than or equal to 100
            • Then - Actions
              • Player - Add -100 to (Owner of (Triggering unit)) Current lumber
              • Player - Add 50 to (Owner of (Triggering unit)) Current gold
              • Sound - Play ReceiveGold <gen> at 100.00% volume, attached to (Triggering unit)
              • Floating Text - Create floating text that reads |cffffd700+50|r above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 48.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Sell Resources (1000/500)
                  • ((Owner of (Triggering unit)) Current lumber) Greater than or equal to 1000
                • Then - Actions
                  • Player - Add -1000 to (Owner of (Triggering unit)) Current lumber
                  • Player - Add 500 to (Owner of (Triggering unit)) Current gold
                  • Sound - Play ReceiveGold <gen> at 100.00% volume, attached to (Triggering unit)
                  • Floating Text - Create floating text that reads |cffffd700+500|r above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 48.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Ability being cast) Equal to Sell Resources (10000/5000)
                      • ((Owner of (Triggering unit)) Current lumber) Greater than or equal to 10000
                    • Then - Actions
                      • Player - Add -10000 to (Owner of (Triggering unit)) Current lumber
                      • Player - Add 5000 to (Owner of (Triggering unit)) Current gold
                      • Sound - Play ReceiveGold <gen> at 100.00% volume, attached to (Triggering unit)
                      • Floating Text - Create floating text that reads |cffffd700+5000|r above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Set the velocity of (Last created floating text) to 48.00 towards 90.00 degrees
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
                    • Else - Actions
                      • Sound - Play Error <gen> at 100.00% volume, attached to (Triggering unit)
 
Status
Not open for further replies.
Top