HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

techtree requirements ignored

03-31-2007, 12:52 PM#1
blacksword6868
I'm trying to make a unit so that it can't just be sold without owning an other specific type of unit (not a building). however, even when I specified the required unit in the techtree requirement field of the unit that's to be sold, it's still available regardless of whether you have the required unit or not. and I don't want to remove the availability of the sold unit from the neutral building by using the trigger remove unit from neutral building because I want it to be available for other players who does'nt have it yet. just greying it out, not removing it, that's what I need. so, uhm, help?
03-31-2007, 03:17 PM#2
blu_da_noob
I don't think techtree requirements would affect merc camps (they only affect the training of units, not the purchasing). You could trigger something to immediately remove the purchased unit and refund the gold if the player doesn't meet the requirements (with a suitable error message).

An alternative is to have a separate buiding for each player where they train the unit for the same cost with a 1 second build time. This may not be suitable for your map though.
03-31-2007, 04:16 PM#3
blacksword6868
Quote:
Originally Posted by blu_da_noob
You could trigger something to immediately remove the purchased unit and refund the gold if the player doesn't meet the requirements (with a suitable error message).

well, yeah that would be fine, but I want the icon greyed out/disabled to signify its unavailability, which can't be accomplished with triggers, so that's why I resorted to tech requirements. and I didn't want to make multiple instances of the 'merc camp' since it's an essential element to the theme of my rpg (I made it so it looks like a person). so.. hmm.
03-31-2007, 04:47 PM#4
blu_da_noob
Heh, I wonder how GetLocalPlayer would work with merc camp unit stock. Worth a try? :P
04-02-2007, 08:17 AM#5
blacksword6868
could you elaborate a bit more on that?