HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing Sold Units from Player Buildings

08-01-2008, 07:13 PM#1
Strilanc
I am modifying a line tower wars map, and I want to include -noair and -noattack options. In LTW you have various unit shrines owned by you which sell units (you don't not train them). That allows easily visible limits on how soon and how quickly you can produce them.

Naturally I assumed that Neutral Building - Remove unit-type from all Marketplaces or Player - Set Training/Construction Availability of Unit would allow me to remove air and attacking units.

I tried giving the buildings neutral classification and the Sell Units ability, but couldn't remove units. I tried adding tech requirements to the units. I tried adding the units via triggers then removing, but that removes the initial delay on sellability. I even tried putting air units at the end of the sell list, including dummy upgrades to cover their usual slot, and researching the upgrades when air units were allowed [won't work with attackers as well].

How the heck am I supposed to do this incredibly simple thing? Including 4 buildings per shrine is a ridiculous option.
08-01-2008, 08:06 PM#2
darkwulfv
In order to do remove items/units from buildings, you have to add them with triggers.

However, a very very simple alternative is to just make all air units have a tech requirement for a dummy unit called "air". If the player(s) decide -noair, just kill the "air" units, and no players will be able to train them!

EDIT: Nevermind what I say below, you already tried that.
I think that would work, but if you're selling them, then I guess you have to manually add/remove the air units via triggers. Not terribly hard.

I would recommend making the "shrines" train units (like a barracks), then just catch when the unit is trained and move it. This will allow you to do option #1 just fine.
08-01-2008, 08:26 PM#3
Themerion
As darkwulfv say. You need to use dummy units as tech requirements. Actual upgrades won't work.
08-01-2008, 08:38 PM#4
Strilanc
The reason I don't want to train the units is because they have stock respawn delays, and initial stock delays.

I tried adding a unit tech requirement of footman, and also a scout tower being built. Even after I killed both I could still buy units depending on them.

I think what I'll do is just kill off any air units when they are trained.
08-01-2008, 09:08 PM#5
Themerion
EDIT: What I wrote before was wrong.

Quote:
Originally Posted by Strilanc
Naturally I assumed that Neutral Building - Remove unit-type from all Marketplaces
Quote:
Originally Posted by Comment field in trigger editor
This affects all buildings that have the 'Sell Unit' ability.

Your shrines have that ability?
08-01-2008, 10:40 PM#6
Strilanc
Yes, I managed to remove units that I added, so the trigger was working. It's in the original post.