• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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: 52
Status
Not open for further replies.
Top