HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Select ability - disable certain units

01-13-2005, 08:47 PM#1
Guest
I'm creating this map where I have a purchasable unit (with inventory) which can buy and run with items for your hero, so that it doesn't have to leave action to buy refreshments.

The problem is created whenever this unit buys a tome (Like Tome of Agility, Tome of Knowledge and etc.) which auto-activates itself on purchase - WC3 crashes for all players. I'm hoping to work around this issue by disallowing the unit to have access to this one particular store where such tomes are sold, but I haven't found a way to do this.

So far I've tried two things; a trigger which disables the ability when cast on this unit from this one shop, and then enables it. I always knew this was a far-fetched approach, but it was worth a shot. Didn't work at all, of course. The second thing I've tried is to make that one unit classified as Ancient and then using a custom Hero Select ability, which can supposedly only target non-ancients and heros. But it still allows the unit to be selected, even though it's clearly not classified as a hero, but ancient. Any working solution to this is received with a much quicker 1.0 release of the map, as well as big thanks.
01-13-2005, 09:44 PM#2
Guest
Edit the object. There's something called Actively used but.. uhh that's not it. Activate when equipped I believe it is, make the value False. That SHOULD work I think, I have no idea if it does though.
01-13-2005, 10:02 PM#3
Guest
In essence, you mean that I should edit the individual tomes, so that they're not used actively, and will be carried within the unit inventory until used? Hmm, that isn't what I want at all, as buyers typically would consume a ton of tomes sequentially, and needing to buy one, use it, buy one, use it etc. when there's only one inventory slot left is something I want to avoid at all costs.

Still, suggestion is welcome. :-)
01-14-2005, 08:53 AM#4
Guest
Yeah!

I fixed the bug by setting the Interaction Type for my custom Select Hero spell to None, instead of one of the different flavors of Any. So now the Runner is unable to do any harm. :D
01-14-2005, 09:03 AM#5
Guest
hmm can you tell me a little more about how? Cause I sort of got the same problem. My hero which stands in town gets all the cannons from the cannon smith instead of my boats :/
01-14-2005, 10:24 AM#6
Guest
Set Interaction Type for your Hero Select ability to None, and set the correct Targets Allowed switches, and it should be OK. If necessary, add extra classifications to the units you do not want to have access to store and switch appropriately in the Targets Allowed property of the Hero Select ability again.