• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Idk how to buy skills with hero to vendor plz help

Status
Not open for further replies.
Level 2
Joined
Aug 17, 2006
Messages
13
I dont know how to make my hero buy skills like customs hero games plz help me i would like it ty
 
Level 11
Joined
Feb 22, 2006
Messages
752
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.
 
Level 2
Joined
Aug 17, 2006
Messages
13
ugh i dont understand

ugh i got it but i wanna do it to a skills that a hero can lvl tell me plz
 
Level 2
Joined
Aug 17, 2006
Messages
13
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
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
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.
 
Level 2
Joined
Aug 17, 2006
Messages
13
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...
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
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.
 
Status
Not open for further replies.
Top