- Joined
- Aug 5, 2007
- Messages
- 49
So I'm trying to create some jass that takes a sold item and adds an ability to the hero.
The thing is, I want the ability added to be 1 of 5 different ones that all do the same thing (just with different hotkeys) depending on the order of sold item.
So say I have 4 warstomp abils for each hotkey (Q,W,E,R) then I sell the "War Stomp" item to the hero, it then adds warstomp Q to the hero. But if I buy it again (for the sake of argument) it adds Warstomp W to the hero.
It gets which ability to add by taking the current slot number, and the base ability as a string.
so if I sell the item I get "WSS" and if it's the first slot I get "1" so together they make "WSS1"
I then need to take that "WSS1" and convert it to the ability id 'WSS1' I can't seem to find the proper method to convert it.
I tried using S21("WSS1") and AbilityId("WSS1") but neither worked.
I have no idea how to pass the trigger 'WSS1' from "WSS1" -.- it looks so easy but I just can't even.
The thing is, I want the ability added to be 1 of 5 different ones that all do the same thing (just with different hotkeys) depending on the order of sold item.
So say I have 4 warstomp abils for each hotkey (Q,W,E,R) then I sell the "War Stomp" item to the hero, it then adds warstomp Q to the hero. But if I buy it again (for the sake of argument) it adds Warstomp W to the hero.
It gets which ability to add by taking the current slot number, and the base ability as a string.
so if I sell the item I get "WSS" and if it's the first slot I get "1" so together they make "WSS1"
I then need to take that "WSS1" and convert it to the ability id 'WSS1' I can't seem to find the proper method to convert it.
I tried using S21("WSS1") and AbilityId("WSS1") but neither worked.
I have no idea how to pass the trigger 'WSS1' from "WSS1" -.- it looks so easy but I just can't even.
Last edited: