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

[Solved] You can probably solve this! +4 rep

Status
Not open for further replies.

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
Thank you for reading my post.

call UnitMakeAbilityPermanent(udg_Temp_Unit, true, 'A05M')


In this line of code, instead of refering to the integer value of my ability directly (in this case A05M) I would like to refer to a variable that has stored the integer value of an ability.

I want to know if I can refer to an integer variable directly in the code as integer variables only stores numbers and in this case we need to refer to "A05M" which also contains letters. An example of what I mean would be this: call UnitMakeAbilityPermanent(udg_Temp_Unit, true, udg_MyIntegerVariable

Perhaps you can refer directly to my ability in the code with something like this:
call UnitMakeAbilityPermanent(udg_Temp_Unit, true, (GetIntegerFromAbility(udg_MyAbility)


If not, I also want to know how to save an ability's integer value to a variable in custom script.

In my mind it should look like something like this:
call set udg_MyIntegerVariable == GetAbilityIntegerValue(MyAbility)

TLDR; I want to call this function UnitMakeAbilityPermanent and refer to udg_MyAbility - how do I go about it as smoothly as possible?

+4 rep to all helpers!
 
Status
Not open for further replies.
Top