• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

how to make hero lern a skill from a shop ?

Status
Not open for further replies.
Level 11
Joined
Nov 13, 2010
Messages
235
hi i try with this but is not working and i need it in gui

  • Events
  • skill
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type Thorns Aura) Equal to (==) True
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type Thorns Aura)
          • Hero - Learn skill for (Hero manipulating item): Thorns Aura
          • Special Effect - Create a special effect attached to the overhead of (Hero manipulating item) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
          • Wait 2.00 seconds
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
 
  • Hero - Learn skill for (Hero manipulating item): Thorns Aura
This only works if the unit already have the ability and you want to force the unit to use a skill point on this skill.
If you want to add the Thorns Aura ability then use.
  • Unit - Add Thorns Aura to (Hero manipulating item)
Remember that you can only add hero abilities to hero units.

Also.
The special effect you create.
Don't add the 2 second wait. First of all it will bug if another unit buys an item in those 2 seconds of time, and secondly it is not necessary at all. The special effect will play for the whole duration even if you destroy it right after you create it.
 
Level 11
Joined
Nov 13, 2010
Messages
235
i know you add a skill to a hero but it can not level up in it i know it can be done but i dont know how ;D

and thx for the info on the 2 second wait

but i know it can be do so a hero buy from a shop and get the skill and can level up in it but i cant remper how to make it
 
i know you add a skill to a hero but it can not level up in it i know it can be done but i dont know how ;D

and thx for the info on the 2 second wait

but i know it can be do so a hero buy from a shop and get the skill and can level up in it but i cant remper how to make it

Yes. It can be done.
But do your hero have the Thorns Aura ability before buying the item?
 
Hm not exactly.
It depends on how you go by it.

If you use:
  • Unit - Add Thorns Aura to (Hero manipulating item)
The hero do not need to have the ability on beforehand, because as the function says, you ADD the ability.

However. If you use:
  • Hero - Learn skill for (Hero manipulating item): Thorns Aura
The hero will LEARN an ability, as in learn an ability the hero already has.

Do you understand the difference?

So if you go with the first method then change your trigger to ADD the Thorns Aura ability. That way your hero will not need the ability on beforehand, and the Thorns Aura ability will be added to the hero.
 
Level 11
Joined
Nov 13, 2010
Messages
235
yes i understand the difference . just been some time off making triggers,
and i made a old map where you pick a hero and you pick 3 skill out of like 30 skills and 1 level 6 skill but in that map they can level up in that skill so is most be hero learn skill but then i see a problem in that you can max add i think is 7 skills to 1 hero . so how do i do that ? cus if you use add ability the hero can not level up in it .
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
What I've done so far is to group all abilities into a single Hero and disable them at the start of the game.

Then, when that unit "buys" skill, the skill would be enabled back by the trigger and therefore you can upgrade your skill ability via the red cross.

The problem is, a Hero can only have up to 5 maximum abilities, more ability than that it won't be registered - which in this case, Divine Shield, Flame Strike and Avatar does not included in the list of available learned abilities of that unit.

Another trick is to learn/level up your abilities via buying the skill multiple of times (but you need the "learn abilities via red cross" right ?)
 

Attachments

  • Shop Learning Ability.w3x
    14.1 KB · Views: 51
What I've done so far is to group all abilities into a single Hero and disable them at the start of the game.

Yup. That can do the trick.
But as you state yourself. A hero can only carry 5 hero abilities. So a maximum of 5 abilities can be bought since the hero needs them from the start of the game.

I bet he wants the hero to be able to buy more than 5 abilities.
 
Level 11
Joined
Nov 13, 2010
Messages
235
i want to make it so you pick a hero from a line up of heros and then pick then skill you want for your hero so that's why it will not work with trying add all skill / abilities to a hero cus as you say it can only have 5 but maybe some like defskull say do group triggers but hard work ;D if i can find out how

btw is a find trigger you made but is not going to work is only 8 skill and btw how dit you set 8 when max is 5 .. ?
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
you could make the shop sell items that is then removed after the hero gets the skill. i still need to do some tests to find out if skills can be leveled up in the same way but at least that enables the heroes to learn the spell. update: i have tested it and it works. heroes can learn skills by aquiring items and the same item can increase the level of the same skill. i will upload the example shortly. map uploaded.
 

Attachments

  • item teaching skills example.w3x
    16.8 KB · Views: 45
Level 11
Joined
Nov 13, 2010
Messages
235
you could make the shop sell items that is then removed after the hero gets the skill. i still need to do some tests to find out if skills can be leveled up in the same way but at least that enables the heroes to learn the spell. update: i have tested it and it works. heroes can learn skills by aquiring items and the same item can increase the level of the same skill. i will upload the example shortly. map uploaded.


will this is like http://www.hiveworkshop.com/forums/spells-569/buying-spells-214430/?prev=search%3DRefund%2520system%26d%3Dlist%26r%3D20
and is close to it but that one you made is almost the same as this trigger system and it is not what iam lokking for

the hero need to learn the skill to he can level up in it hem self
like in that map i posted
 
Status
Not open for further replies.
Top