• 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.

Skill Replacement

Status
Not open for further replies.
Level 2
Joined
Apr 25, 2007
Messages
17
How i put this......
I want to make a map where hero can learn abilities from schools (it will be building where they buy an ability like buying items). But they can also relearn abilities. Maximum abilities that hero could have would be 4 and when hero got 4 abilities and want to learn some another one, im asking if there is a script that can replace abilities.
For example :
Hero have Fireball lvl.5 and when he want he can relearn Firebal lvl.5 for Soulshot lvl.1.

Srry for my english
i wish u guys know what i want to say :)
 
Level 5
Joined
Jun 23, 2004
Messages
126
Well it's easy enough to remove an ability from a Hero, more to the question, how does the player select which ability he wants to remove? You may have to set up a Dialog system to do that, where the player is given a choice of which of his abilities to clean out.

Is that helpful? (Can be more specific if needed.)
 
Level 6
Joined
Apr 21, 2007
Messages
188
you could just do a chat command i guess. say type -remove fireball lvl 5 and poof its gone.
 
Level 5
Joined
Jun 23, 2004
Messages
126
Whats the script if i want to remove ability for example on position y:3 x:1 ?

I don't believe you can do that, you have to remove them based on what ability they are.

Y goes up to 2 :p

It might be possible to set up an ability array (call it AbilArray) that holds each ability as it as bought.

Player buys first ability: Set AbilArray[0]=(Ability)

Player buys second ability: Set AbilArray[1]=(Ability)

Etc. As long as the abilities fill in from left to right (as I believe they do) you should be able to track what square has what ability.

Edit: Oh and note that if you want to save the character and load him again, you'd probably need to save the AbilArray variables as well since I doubt there'd be a way to read them off newly.
 
Level 2
Joined
Apr 25, 2007
Messages
17
Oh no....i dont want to make some RPG map :) i want to make PvP map something like DotA but u have to collect items from creeps etc.
But still dont know action for deleting abillities :/ . U know if i want to delete Fireball, i know what to write into events,conditions but what is the action for deleting spells ?
 
Level 5
Joined
Jun 23, 2004
Messages
126
...Well you're sounding slightly contrary (I can understand, ESL and all).

To "delete" or remove an ability, you use the action:
Unit - Remove (Ability) from (Unit)

If I properly understand how your ability system works, this is how you would set it up:
Event: Unit - A unit Uses an item
Condition: (Item-type of (Item being manipulated)) Equal to (Your Item)
Action: Unit - Add (Your Ability) to (Triggering unit)

Am I right?

...Hm the system to do this is kinda complicated to explain, lemme just do it up in WE, screenshot and post it.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Whats the script if i want to remove ability for example on position y:3 x:1 ?

am I right if I say that all spells that are located at (1,3) are from the same school, and you can only learn 1 spell from a certain school?

If that's so, I'd make the player choose 1 of the schools (like type -remove Necromancy) and then have that trigger remove all possible necromantic abilities. The hero will lose his necromantic ability this way...
 
Level 5
Joined
Jun 23, 2004
Messages
126
Well, I was more thinking along the lines of assigning each ability to the AbilVar[X] array, and then presenting a dialog box and let the player choose which one to remove, removing it, then assigning the new one to the old AbilVar[X] number. I had to do some other stuff else I woulda done up the whole thing, but I think you get the picture.
 
Level 4
Joined
Dec 30, 2006
Messages
84
I think that Vexorian (or someone else, I am not sure:sad: ) made something like that a while ago its Dota Teamplate based map with Shops where you buy skills... Since I am not at home I cannot verify that, but I will let you know when I will get home.
 
Status
Not open for further replies.
Top