HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Giving an ability when a unit buys an item?

03-31-2006, 02:18 PM#1
Fulla
Trigger:
Unit - A unit Sells an item (from shop)
(Unit-type of (Buying unit)) Equal to Elf, Shaman
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Sold Item)) Equal to Learn [Green] - Bramble Elemental
Collapse Then - Actions
Unit - Set Level of Bramble Elemental [Summon Lava Spawn] for (Buying unit) to ((Level of Bramble Elemental [Summon Lava Spawn] for (Buying unit)) + 1)
Unit - Add Bramble Elemental [Summon Lava Spawn] to (Buying unit)
Collapse Else - Actions
Do nothing

I tried, acquires item and hero manipulating item as well but it doesnt work.

Basically its simply meant add an ability if the unit buys an item. Or set its level to +1
03-31-2006, 02:31 PM#2
Thunder_Eye
You have to add the ability before you sets its level
03-31-2006, 02:34 PM#3
Naakaloh
Try using Aquires an item again and use Triggering Unit instead. Not sure if it will help, but it's the first thing I can think of since can't really seem to think at all right now...

Edit: Haha, of course what Thunder_Eye says makes more sense... Like pluging it in before switching it on :) The only thing is I don't know if that's the reason, since it still doesn't add the ability.
03-31-2006, 04:27 PM#4
Thunder_Eye
Yeah I know, its a start though :P
try what Naakaloh said.

EDIT: I tried the trigger and didnt see any problem, might be the conditions.
I re-read his post and I think he doesnt mean that the ability doesnt get added, it just doesnt do what its supposed to.

@Fulla
You'll have to add an check if the unit has the ability already, and as there isnt any "Unit has Ability" condition, I suggest you use handle vars to determine if the unit has it or not.