HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Strange Problem

02-02-2006, 12:40 PM#1
Das Jank
I have a building in my map that has the "Sells Item" ability. At the start of the game a trigger adds a bunch of items to the building that are substitutes for upgrades. So far I have a total of 11 upgrades on the building and when you buy an upgrade like "Weapons Upgrade 1 (set to spot 0,0)," triggers remove the item , add the item called "Weapons Upgrade 2 (also set to spot 0,0)," and then sets Iron Weapons Upgrade to 1. My problem is that for some reason when you buy say "Speed Upgrade 1," it is upgraded and replaced by "Speed Upgrade 2," but Weapons Upgrade 1 or Defence Upgrade 1 also seem to get removed from the shop but not replaced and not upgraded. Its kind of strange becuase it if you buy Weapons and Defence first then other upgrades start dissapearing at random. Any clue why this is going on?

P.S. Ive checked the trigger over like 50 times and theres no missing input to like also remove Weapons 1 when Speed 1 is bought. I can post it if needed though.
02-02-2006, 12:54 PM#2
Whitehorn
Did you base all these dummy abilities onthe same ability?
02-02-2006, 01:34 PM#3
qwertyui
I don't think that having the same base item affects item removal...
Regardless, you need to make absolutely sure that you have set all items to correct positions on the shop.
It would also help if you posted a trigger here.
02-02-2006, 03:11 PM#4
Das Jank
Heres the trigger:

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 Speed Upgrade 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 Speed Upgrade 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

Quote:
Originally Posted by Whitehorn
Did you base all these dummy abilities onthe same ability?
Im not using dummy abilitys, im using dummy items (powerups). I copy and pasted all of the items from the same base one but ive tried changing every little thing about the items to make them differ from eachother and it still happens.
02-02-2006, 03:39 PM#5
Whitehorn
Using the same base item is probably the problem IMO.
02-02-2006, 04:48 PM#6
Anitarf
Nah, that shouldn't be a problem. It's only an issue with abilitis because of the orderstring conflict, but it definitely shouldn't be an issue with items.
02-02-2006, 04:51 PM#7
Taur
err maybe they use the same item cool down?
02-03-2006, 02:11 PM#8
Das Jank
I tried switching the item cooldowns and every other little think about the items that you can change and it still didnt work.
02-03-2006, 02:24 PM#9
Whitehorn
Quote:
Originally Posted by Anitarf
Nah, that shouldn't be a problem. It's only an issue with abilitis because of the orderstring conflict, but it definitely shouldn't be an issue with items.

I think you are wrong.

For example, give a unit 2 or more abilities based on 'build tiny x'. Even try the default abilities.

Use one, use any. One overwrites the others.
02-03-2006, 04:08 PM#10
Anitarf
Quote:
Originally Posted by Whitehorn
I think you are wrong.

For example, give a unit 2 or more abilities based on 'build tiny x'. Even try the default abilities.

Use one, use any. One overwrites the others.
As I said, that's an issue with orderstrings; they depend on what spell you base your spell on. But with items, there shouldn't be any data that depends on what item you base it on; all stats of items are changeable in the object editor (unlike spells, where the spell code and orderstring used, as well as data fields avaliable in the object editor, depend on what spell you base it on).