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

[Spell] How to save Ability Code as a variable in a hashtable using GUI?

Level 3
Joined
Sep 9, 2022
Messages
12
I'm trying to save an Ability Code variable for a specific unit key. "Let's call it AddAbility" into a hashtable so I can add the ability back to a unit later. I already have the unit's handle as Unitkey

My issue is that I can't find a way to save ability code variables into a hashtable. All I can save is integers but to use Add Ability to Unit actions I need ability code. How do I work around this?

I have AddAbility[0] as a first ability and I want each integer as seperate ones for each unit.

This is a simple example of how i'm trying to add the ability.
  • For each (Integer A) from 0 to Unitkey, do (Actions)
    • Loop - Actions
      • Unit - Add AddAbility[(Integer A)] to (Last replaced unit)
 
Top