Warcraft III resources & community, 2003–2006 · archived

Idk how to buy skills with hero to vendor plz help

9 posts
#1

Idk how to buy skills with hero to vendor plz help

I dont know how to make my hero buy skills like customs hero games plz help me i would like it ty
#2
Did you try to solve problem yourself? You did right? Tell us what you tried and why you failed.
#3
For each ability you want to be purchasable, create a different item. Make sure the item restock time is 0. Make your building able to make (NOT sell, make) these items. Then put this trigger into your map.

Trigger Buy Ability

Events

Unit - unit acquires an item

Conditions

None

Actions

Custom Script: if ( GetItemTypeId(GetManipulatedItem()) == [insert raw code for an item type here] ) then
Item - remove manipulated item
Unit - Add [ability associated with item] to Triggering unit
Custom Script: elseif ( GetItemTypeId...
...
...
Custom Script: endif

Basically, for every ability, add in another "elseif", so that every time a unit buys an item, the item is instantly removed from the unit's inventory and the ability is added to the unit. The reason for the custom script is because elseif is a lot better than having dozens of if-then-else loops.
#4

ugh i dont understand

ugh i got it but i wanna do it to a skills that a hero can lvl tell me plz
#5
Load up a map like hero builder arena into your worldeditor and find the triggers/items associated with the ability levels, then just put it all in your map with different abilities.
#6

omg i did

ok. really man why would i send this if idk how to : lmao i mean I ALREADY DID it and they was protected soooo......... plz tell me how .... put a skills to a hero that can lvl like custom hero arena
#7
in custom hero arena they use triggers to level it up. i haven't played it in a while, but did you ever notice that they don't directly give you the ability, but instead like "Attack ability", "Defense Ability", etc. they still use triggers.
#8

i know....

I Know, I wanna know how THEY DO idk im little new to map making ... I mean tell me wich trigger to use...
#9
it's set up so that when you learn the ability, it takes away the old "level" of the spell and gives the new one. actually, the "hero ability" button might be a spell book-based ability. set up an array of 4 whatever for each player, have each position represent a different abil (offensive, defensive, extra, ult) and then have the trigger for buying the ability change the number at the array based on what's bought. have other triggers, one for each player, go off that when the spells are "learned" (in the spell book case, casted) it gives the next level of the spell, which is being kept track of by the array. there's somebody here who could explain it a lot better than i can, but they may not care to answer.