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

A few different questions

Status
Not open for further replies.
Level 3
Joined
Oct 4, 2008
Messages
31
hi guys, I haven't been on hiveworkshop in awhile. Anyways, let me get down to the point. I have a few triggers that I do not know how to do. Could anyone please assist me? I would greatly appreciate it, thank you.

Trigger problem #1) How do you to keeps trees from being chopped down. I want the wood cutters to get wood from them but they always get chopped down. No, I do not want the wisp wood cutter ability.


Trigger problem #2) How do you upgrade another players weapons/armor. For example I wanna have an upgrade button in my weapons forge to upgrade player 9 attack. This needs to work with other players since my map is a team game. So the entire team needs to be able to upgrade player 9 attack and go to the next level when a different teammate upgrades. So lets say Red upgrades player 9s attack to lvl 1 and then Blue upgrades player 9s attack. It needs to go to level 2 not stop at level 1.


Trigger problem #3) If you ever played Legion TD you'd notice that their is a building that increases your income by selingls many units. These units cost wood and give income per turn. I was wondering how you do this trigger.

Thank you in advance.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

1) You can increase the hitpoints of the trees xxx Hitpoints. If you hold shift and click "Stats - Hitpoint" you can give a tree (mom) "1.000.000.000 Hitpoints). If this isn't enough you can use the following trigger:
  • Restore Tree
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (You can add here your tree types if you want)
            • Then - Actions
              • Destructible - Set life of (Picked destructible) to 100.00%
            • Else - Actions
2) Use the trigger:
  • Research
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Iron Forged Swords
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 9 (Gray) of type Arcane Sanctum) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to research Defend
2.1 You need to pick that building or Unit that is able to use this upgrade. You can make this picked unit like a dummy - no modell no shadows etc.

3) This can be done (if I understand you correctly) by this triggers:
  • Increase Income
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + (Point-value of (Trained unit)))
  • Get Income
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked player) slot status) Equal to Is playing
                  • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player - Add Income[(Player number of (Owner of (Triggering unit)))] to (Picked player) Current gold
            • Else - Actions
3.1 If you create your units, make sure you give them the correct point value.
3.2 Income is an Integer Variable with array
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Seas =)

1) You can increase the hitpoints of the trees xxx Hitpoints. If you hold shift and click "Stats - Hitpoint" you can give a tree (mom) "1.000.000.000 Hitpoints). If this isn't enough you can use the following trigger:
  • Restore Tree
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (You can add here your tree types if you want)
            • Then - Actions
              • Destructible - Set life of (Picked destructible) to 100.00%
            • Else - Actions
2) Use the trigger:
  • Research
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Iron Forged Swords
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 9 (Gray) of type Arcane Sanctum) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to research Defend
2.1 You need to pick that building or Unit that is able to use this upgrade. You can make this picked unit like a dummy - no modell no shadows etc.

3) This can be done (if I understand you correctly) by this triggers:
  • Increase Income
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + (Point-value of (Trained unit)))
  • Get Income
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked player) slot status) Equal to Is playing
                  • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player - Add Income[(Player number of (Owner of (Triggering unit)))] to (Picked player) Current gold
            • Else - Actions
3.1 If you create your units, make sure you give them the correct point value.
3.2 Income is an Integer Variable with array

1. Stop with the stupid lies, everyone knows that the maximum value in Object Editor is 100,000 even if its displays 1000000000000000 it still 100,000. The solution in this case is to edit the "Harvent (Gold and Lumber" ability so it can target "Invulnerable" targets, then make all trees invulnerable... there you go, infinite trees.

2. If 1 player research the upgrade, all players must see it at level 2...

3. Leaks player-group. Here you can store all players on initiliazation into an veriable then use it for the Income trigger, or set the veriable into the trigger, then destroy the force.
 
Status
Not open for further replies.
Top