• 🏆 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!

Skill Requires Item

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
You can give requirements to skills in two ways:

- Level Requirement
- Upgrades

You need to give an ability an upgrade requirement. Trigger the ability so the upgrade is researched upon gaining an item.

Edit: Bear in mind, this will enable the ability for all heroes of that player.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
I thought you said it doesn't matter if the ability remains after dropping the item. Why do you need to remove the upgrade?

Btw, I don't think you can unlearn upgrades.

Edit: You could remove the ability via triggers. I am unsure if you can trigger new ability requirements through triggers. Somebody else will have to answer that for you.
 
Level 4
Joined
May 18, 2013
Messages
36
I meant i didn't want to use the ability where the Item gives you the ability.

I want the the hero to still have the skill, but either the skill consumes a perishable item (like ammo), then when you run out of ammo, the skill wont work.
Or the Skill requires a permanent item to work, but when you drop the required item, the skill won't work, but will still be there, and when you pick the item up again, the skill will work again.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
I want the the hero to still have the skill, but either the skill consumes a perishable item (like ammo), then when you run out of ammo, the skill wont work.

You could make skills cost mana (mana being ammo). No mana, the skill wont work obviously. Make mana regeneration to 0, allowing only items (such as ammo refill packs) to grant set amounts of mana.

Or the Skill requires a permanent item to work, but when you drop the required item, the skill won't work, but will still be there, and when you pick the item up again, the skill will work again.

Give your hero the skill. Then trigger it like this:

  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
        • Then - Actions
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
If the hero doesn't have the item, he will be stopped before he is actually able to cast the ability. If you want an error message to display, here:

  • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: Must have Claws of ...
Edit:

I just thought of maybe when I don't have the Item, the skill that requires it will be replaced with a skill with the same icon but does nothing. Maybe that would work

Yes, that can work. This is up to you. This system may take more time to make (making another icon for every ability), but it might be nicer. The player will have a (disabled) tag on their ability to make it more clear they are unable to use the ability. Ultimately up to you how you go about it.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Okay, Thanks. I'll just turn off all the animation and set some values of the skill to 0 so it won't have any effect.

Is this to create dummy abilities? I don't recommend this. It would be best to make passive abilities to use as disabled abilities (ones you cannot click on). This will make it clear to the player that it is disabled and has no effect until they get the item back. It must be confusing if an ability is able to cast yet have no effect. Also, you cant simply turn off animations. It may cause problems.
 
Status
Not open for further replies.
Top