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

Learn a hero skill from a vendor

Status
Not open for further replies.
Level 1
Joined
Jun 21, 2009
Messages
282
+Rep Hey guys, I need this trigger where a hero buys a tome of power from a vendor, and I need it so that hero will learn breath of fire once you buy that tome of power, and once you learn it, the red hero button will appear and you will be able to put skills points into it.

Does anybody know if there is such a trigger?? :grin:

Please and thank you!
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Last created item)) Equal to Tome of Experience
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Hero - Learn skill for (Triggering unit): Breath of Fire
      • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
Possible to modify that to do more than 1 item
 
Level 1
Joined
Jun 21, 2009
Messages
282
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Last created item)) Equal to Tome of Experience
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Hero - Learn skill for (Triggering unit): Breath of Fire
      • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
Possible to modify that to do more than 1 item

Alright, I did this and when I bought the tome, the ability didn't show up at all..

Any idea whats wrong with it?
 
Last edited:
Level 7
Joined
May 18, 2010
Messages
264
then last created item wont work
h8 to open world editor but i think
item being manepuled or something
cant tell u from my head like this sry
 
Level 1
Joined
Jun 21, 2009
Messages
282
weird, could you post the code you are using?

I'm not sure how to link the whole code, but this is what i'm using:


Event: Unit - A unit Acquires an item

Condition:
(Item-type of (Item being manipulated)) Equal to Breath of Fire

((Triggering unit) is A Hero) Equal to True

Action:
Hero - Learn skill for (Triggering unit): Breath of Fire

Hero - Modify unspent skill points of (Triggering unit): Add 1 points

And thats it

Any reason why it ain't working?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
To begin with, your Hero doesn't have this ability, right ?
So, if you didn't put anything inside the Object Editor, considering your game is an "item-buying-level-up-ability-spell-system", you can only level up your ability through buying that item and through trigger
The red cross, can't appear as the game interprets it very well that the unit doesn't have the ability to begin with, thus returning a null result.
Test map attached
 

Attachments

  • Learn Ability From Vendor.w3x
    13.2 KB · Views: 58
Level 1
Joined
Jun 21, 2009
Messages
282
Yes, my hero's don't have the Ability, I wanted it so you could buy the item, and then the hero's would be able to level it up themselfs through skill points. But I guess everything you plan out doesn't always go your way, and there are flaws into these things. Thanks man, i'll use the vendor-buying one.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
There is a cumbersome way by using the 'Engineer Upgrade' of the tinker. This ability can transform other abilities that the hero already possesses. So you had to have stub abilities on your hero that are only there to be replaced (you can hide them) and for each of these stub abilities you would have an 'Engineer Upgrade' per purchasable ability in order to allow it on each stub and therefore for each combination.
 
Status
Not open for further replies.
Top