| 11-03-2003, 04:47 PM | #1 |
Is it possible to make normal units like grunts use hero items like potions of healing? |
| 11-03-2003, 05:03 PM | #2 |
You can change them into heros, and only give them the ability to only have 2 slots so there basicly the same, but otherwise I am almost sure they can't. Mabey threw a custom trigger spell, is my best guess around that. |
| 11-03-2003, 05:08 PM | #3 |
Well im trying to avoid making them heros all together. They would be for mercs, and i know how people hate having more hero buttons on the side than they need. If it doesnt work i can always find another way around it. Anyone else have some thoughts? |
| 11-03-2003, 05:14 PM | #4 |
I have an idea: 1 - Make a new ability called "whatever" based on Healing aura from the Health Fountain, change it´s settings so that the healing factor activate really fast(just the same speed of the potions). 2 - Make a trigger wich put them under the "whatever" effects aura and at the same time remove that item when you use it. I hope it helps. |
| 11-03-2003, 05:19 PM | #5 |
I dont think that would work because that would require to be activly used by the unit. And i dont think if you put orb of frost on a grunt it will give the grunt +6 dmg and slow dmg bonus. Im trying to find out if theres a way to have units actively use items |
| 11-03-2003, 05:25 PM | #6 |
ANY unit (hero or not, even buildings) can use items if given a HERO inventory (normal ability). If you want to limit the inventory to less then six, then just make a new ability based off the hero inventory and change the amount of slots. There is NO need for any triggers or "workarounds" because it already works. Its as easy as that. I have used this fact in a few of my maps, and you can see this fact in action if you play "Vraq's Four Corners RPG" the pack horses are regular units, and they have a hero inventory and can therefore use items, same with the "Salamander King" that is in that map. EDIT: Actually its been a long time since I played that map, so I don't remember if the salamander king can use item or not... |
| 11-03-2003, 05:35 PM | #7 |
:hm::hm::hm::hm:...it´s starting to be harder than i thought...well, perhaps a few hours of research would help. I´m at work now, but, as soon as iget home i´ll try researching, and , if find something i´ll post it. How´s you at coding? I´m thinking that it´s possible with Jass Programing(i fact i already have a scope on my Brain), but, i´l show only if it work. And if it don´t work i´ll let you know too :knife: :infth: :thrust: |
| 11-03-2003, 06:20 PM | #8 |
AllPainful's method is the correct one - Just give any unit you want to be able to use items an ability based off one of the following: Inventory - Hero Unit Inventory - Human (or Undead, or Night Elf, etc.) And make sure the field in the ability under "Data - Can use items" is set to True. Bingo - you're done. Oh, and don't forget if you're using the Unit Inventory that you have to change its techtree requirements so it doesn't require the backpack upgrade. |
| 11-03-2003, 08:01 PM | #9 |
Big warning when a unit with a hero inventory uses a tome = BIG CRASH. This means you either need to have no tomes on your map, or the situtation(s) where units get items has to be limited in some way (for example only getting items through triggers) |
| 11-04-2003, 02:14 AM | #10 |
just give them the hero ability inventory, true, and make a trigger so when a unit picks up a tome, remove it. |
| 11-05-2003, 12:03 PM | #11 | |
Quote:
The same happens with every item that increases any of the 3 hero attributes. Just be sure there is no item like those in your map, If you need heroes in your map and want those items, you can still make this trick: 1) Make every of those items to have 74 hit points 2) Make this trigger: Events: A unit is issued an order targetting an object Conditions ((triggering unit is a hero) equal to false) (Target item of issued order) not equal to no item (Issued order equal to Order(smart)) Actions set hit points of (Target item of issued order) to 1000000.00 //(the biggest amount possible) IF then else - Conditions: -- (Hit poinst of (Target item of issued order) equal to 74 - Actions: -- Pause (triggering unit) -- turn off this trigger -- Order (triggering unit) to stop -- unPause (triggering unit) -- turn on this trigger -- Game - Show text message to (Convert (Owner of triggering unit) to Player group) (Units can't use those items) |
| 11-06-2003, 02:33 AM | #12 |
oh no there wont be any tomes in my map, but thanks for the info. Im using a different system. Instead of heros, its just a normal unit, kind of like a half hero. You can buy upgrades for it and every 10 kills you get 1 wood and you can buy more hp, faster attack, and certain upgrades with the lumber. |
