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

Triggering help needed. Items sold and unit orders

Status
Not open for further replies.
Level 6
Joined
May 15, 2009
Messages
191
Battlehound asking for help again.

This time around I thought, that I had made a smart trigger system for upgrades in my map - but it won't work.

What I want it to do is when you buy an item (the item has no effect whatsoever) you order an invisible blacksmith style unit make an upgrade fitting for the item you got. For example; You buy Upgrade Ranged Armor, this should issue an order to your upgrader that it should make the Ranged Armor upgrade.

Now I made the trigger so that it should function no matter what player got the item, but nothing seems to happen:(

Heres the trigger:

  • Upgrading
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Upgrade Melee Armor
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Upgrader) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
            • Loop - Actions
              • Unit - Order (Picked unit) to research Melee Armor
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Upgrade Melee Damage
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Upgrader) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
            • Loop - Actions
              • Unit - Order (Picked unit) to research Melee Damage
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Upgrade Ranged Armor
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Upgrader) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
            • Loop - Actions
              • Unit - Order (Picked unit) to research Ranged Armor
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Upgrade Ranged Damage
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Upgrader) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
            • Loop - Actions
              • Unit - Order (Picked unit) to research Ranged Damage
        • Else - Actions
Help much appreciated.
(btw, I have 1 upgrader unit placed on the map for each player.)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
AFAIK, "Item Being Manipulated " is not set in Unit - A unit sells an item but "Sold Item" is. try that

also, much easier to just Player - Set level of Research to # for Player
 
Status
Not open for further replies.
Top