• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Item to Ability

Status
Not open for further replies.
Level 8
Joined
Jun 16, 2008
Messages
333
I am working on this capture the flag map and you have to make your own paths with the tree eaters but you have to buy the item from a shop and I want to know how to make the item to turn into an ability like in Custom Hero Line Wars and Footies
 
Level 9
Joined
Dec 6, 2007
Messages
233
This should do it

  • trigger
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to item
    • Actions
      • Unit - Add ability to (Buying unit)
      • Item - Remove (Sold Item)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
First of all, your trigger should look more like this:

  • Tree Branch
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Tree Eater
    • Actions
      • Unit - Add Force of Nature to (Triggering unit)
Also, you cannot add an ability to a unit properly when an item is already giving the unit that ability. If you remove the Force of Nature ability from the item and fix the trigger as I have demonstrated, it should work (it does for me, and I have it working now).
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
If the item is perishable as a power-up then you shouldn't need to.

I re-created your item based on a power-up and it is properly removed from the inventory without the need to remove it through code.
 

Attachments

  • Capture the flag.w3x
    48.4 KB · Views: 54
Status
Not open for further replies.
Top