- Joined
- May 15, 2009
- Messages
- 192
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:
(btw, I have 1 upgrader unit placed on the map for each player.)
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
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
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
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
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
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
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
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
(btw, I have 1 upgrader unit placed on the map for each player.)