• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item ability

Status
Not open for further replies.
Level 1
Joined
Jun 17, 2020
Messages
2
Hi everyone,
I was making items ability and got stuck. The ideal is to create item with hero ability. So when player buy the item from shop they can use the ability of that item once then It will disappear.

what I did:
- create ability
- create item with that ability
- create a shop that sell the item
Result:
When testing, My character could buy it but then the game closed after I used the item.

I am new to world editor, don’t know much.
Could someone tell me what to do?
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
I don't know exactly what you did. here's an easy way to do this:

a. create a dummy item (looks right, does nothing - you can base it on a different item that does nothing, like "cheese")
b. create the ability you want.
c. create these triggers:

  • Give Ability
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to 'Your Item'
    • Actions
      • Unit - Add 'Your Ability' to (Triggering unit)
  • Remove Item
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to 'Your ability'
    • Actions
      • Item - Remove (Item carried by (Triggering unit) of type 'Your item')
      • Unit - Remove 'your ability' from (Triggering unit)
Edit: I added an important line I forgot to the second trigger
 
Last edited:
Status
Not open for further replies.
Top