HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

HUGE bug, item replacing in a shop?

01-21-2006, 11:09 PM#1
Das Jank
In my map I have it so units spawn near a barracks and attack to a certain location (kinda like an AOS map but its not an AOS). The barracks sells items which are added to it at the start of the game. All of the items are powerups so they are used instantly and it doesnt give you the message about your inventory being full if it is. Each item is triggered so that when a person buys it,it upgrades attack, defence, or even adds more creeps that spawn each round. All was going fine until all of a sudden when you buy 1 item it removes another from the shop, not all of them do this, but for some reason it seem kind of random. Here is the trigger that reads when an item is bought and then upgrades it at the shop:

Trigger:
Barracks Stuff
Collapse Events
Unit - A unit Acquires an item
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Attack Upgrade 1
Collapse Then - Actions
Player - Set the current research level of Iron Forged Swords to 1 for Player 9 (Gray)
Neutral Building - Remove Attack Upgrade 1 from all marketplaces
Neutral Building - Add Attack Upgrade 2 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Attack Upgrade 2
Collapse Then - Actions
Player - Set the current research level of Iron Forged Swords to 2 for Player 9 (Gray)
Neutral Building - Remove Attack Upgrade 2 from all marketplaces
Neutral Building - Add Attack Upgrade 3 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Attack Upgrade 3
Collapse Then - Actions
Player - Set the current research level of Iron Forged Swords to 3 for Player 9 (Gray)
Neutral Building - Remove Attack Upgrade 3 from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Defence Upgrade 1
Collapse Then - Actions
Player - Set the current research level of Iron Plating to 1 for Player 9 (Gray)
Neutral Building - Remove Defence Upgrade 1 from all marketplaces
Neutral Building - Add Defence Upgrade 2 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Defence Upgrade 2
Collapse Then - Actions
Player - Set the current research level of Iron Plating to 2 for Player 9 (Gray)
Neutral Building - Remove Defence Upgrade 2 from all marketplaces
Neutral Building - Add Defence Upgrade 3 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Defence Upgrade 3
Collapse Then - Actions
Player - Set the current research level of Iron Plating to 3 for Player 9 (Gray)
Neutral Building - Remove Defence Upgrade 3 from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Sorceress Adept Training
Collapse Then - Actions
Neutral Building - Remove Sorceress Adept Training from all marketplaces
Player - Set the current research level of Sorceress Adept Training to 1 for Player 9 (Gray)
Neutral Building - Add Sorceress Master Training to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Sorceress Master Training
Collapse Then - Actions
Neutral Building - Remove Sorceress Master Training from all marketplaces
Player - Set the current research level of Sorceress Adept Training to 2 for Player 9 (Gray)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Add Sorceress
(Current research level of Add Sorceress for Player 9 (Gray)) Equal to 0
Collapse Then - Actions
Player - Set the current research level of Add Sorceress to 1 for Player 9 (Gray)
Neutral Building - Remove Add Sorceress from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Add Footman
(Current research level of Add Footman for Player 9 (Gray)) Equal to 0
Collapse Then - Actions
Player - Set the current research level of Add Footman to 1 for Player 9 (Gray)
Neutral Building - Remove Add Footman from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Add Rifleman
(Current research level of Add Rifleman for Player 9 (Gray)) Equal to 0
Collapse Then - Actions
Player - Set the current research level of Add Rifleman to 1 for Player 9 (Gray)
Neutral Building - Remove Add Rifleman from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Add Knight
(Current research level of Add Knight for Player 9 (Gray)) Equal to 0
Collapse Then - Actions
Player - Set the current research level of Add Knight to 1 for Player 9 (Gray)
Neutral Building - Remove Add Knight from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Rifleman Training
Collapse Then - Actions
Player - Set the current research level of Long Rifles to 1 for Player 9 (Gray)
Neutral Building - Remove Rifleman Training from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Health Upgrade Level 1
Collapse Then - Actions
Player - Set the current research level of Animal War Training to 1 for Player 9 (Gray)
Neutral Building - Remove Health Upgrade Level 1 from all marketplaces
Neutral Building - Add Health Upgrade Level 2 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Health Upgrade Level 2
Collapse Then - Actions
Player - Set the current research level of Animal War Training to 2 for Player 9 (Gray)
Neutral Building - Remove Health Upgrade Level 2 from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Speed Upgrade 1
Collapse Then - Actions
Player - Set the current research level of Upgrade Attack Speed to 1 for Player 9 (Gray)
Neutral Building - Remove Speed Upgrade 1 from all marketplaces
Neutral Building - Add Speed Upgrade 2 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Speed Upgrade 2
Collapse Then - Actions
Player - Set the current research level of Upgrade Attack Speed to 2 for Player 9 (Gray)
Neutral Building - Remove Speed Upgrade 2 from all marketplaces
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Masonry Upgrade 1
Collapse Then - Actions
Player - Set the current research level of Improved Masonry to 1 for Player 9 (Gray)
Neutral Building - Remove Masonry Upgrade 1 from all marketplaces
Neutral Building - Add Masonry Upgrade 2 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Masonry Upgrade 2
Collapse Then - Actions
Player - Set the current research level of Improved Masonry to 2 for Player 9 (Gray)
Neutral Building - Remove Masonry Upgrade 2 from all marketplaces
Neutral Building - Add Masonry Upgrade 3 to all marketplaces with 0 in stock and a max stock of 1
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item being manipulated)) Equal to Masonry Upgrade 3
Collapse Then - Actions
Player - Set the current research level of Improved Masonry to 3 for Player 9 (Gray)
Neutral Building - Remove Masonry Upgrade 3 from all marketplaces
Collapse Else - Actions
Do nothing