HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is it possible to upgrade a specific structure that belongs to an ally?

01-24-2009, 01:07 PM#1
Matarael
I know that upgrading a techtree item for an ally is possible through triggers (and I've done it as well), but let's say:

It's a tower defense, and there are computer towers or something. You want certain towers to be upgraded. Would this be possible?
I can think of a few complicated ways to do it but before I try them out I want to know if there is a simple way to do it.

Thanks.
01-24-2009, 02:14 PM#2
fX_
Share control?

or maybe you can make a trigger that is prompted when a tower is selected.

then u can force select some dummy tower (belonging to the player) that has a button in the command card for upgrading.
when the button is clicked. upgrade the selected tower.
01-24-2009, 04:34 PM#3
Matarael
Yes I suppose that is an option. My other idea was to use an ability which is targeted to the specific tower, after which it will upgrade. But that would mean making a unit with this ability.
Thanks for that idea still; it's flexible enough to be used for more than just this function in future needs.

Any other ideas? :)
01-24-2009, 05:18 PM#4
akolyt0r
i would choose the "targeting with a spell" option ...
of course you could even automatically upgrade it when the tower gets selected ...
or by a chatcommand like "-upgrade" which upgrades selected tower ...
01-24-2009, 05:30 PM#5
Ammorth
chat commands are ugly. They should be avoided 99% of the time.
01-24-2009, 05:38 PM#6
akolyt0r
i assume you have no heros or something like that in ur ..td ...but maybe you could give your builder, or some "maintower" ...some items ...which can be used for special things like this ...
the item for this thing should have a targetable activatable spell of course ...
01-24-2009, 05:48 PM#7
Archmage Owenalacaster
You need Advanced Shared Control to issue build orders to another player's units: SetPlayerAlliance (computer_player, user_player, ALLIANCE_SHARED_ADVANCED_CONTROL, true). And make sure the computer doesn't have an AI (as in a .ai file) or it can cancel your orders.

Using abilities and triggers to upgrade the towers is a good second choice, depending on your needs. (Like the computer has units you don't want the user to control or some such.)
01-24-2009, 10:50 PM#8
Valdez
You can give it shop sharing and have it sell items (charged, used aurtomatically and destroys when used) that when purchased will learn that upgrade.. problem is that there would need to be a unit within range of purchasing and give inventories to builders..
01-24-2009, 11:00 PM#9
Blackroot
Quote:
Originally Posted by Valdez
You can give it shop sharing and have it sell items (charged, used aurtomatically and destroys when used) that when purchased will learn that upgrade.. problem is that there would need to be a unit within range of purchasing and give inventories to builders..

Or you could modify the item use range to 65536 (There is a particular reason for this number, trust me :P) and make the builder a unit with an inventory.

Advanced shared control is probably the simpler option for most cases. -Remember it's also possible to give the unit to a player selecting the tower, and remove the players control on deselect as it was stated that AI will often override your commands.