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

[JASS] get/store integer with integer index per unit

Status
Not open for further replies.
Level 6
Joined
Feb 18, 2005
Messages
263
Hi
I know the topic sounds quite difficult, but heck i disbelieve it is and i would do it myself, if i could figure out about the gamecache (i know how it should work, but it doesn't -.-)

So here is the reason why i need the script:
I'd like a spell-learning-system for my map in which a spell is not improved via levelup but via using it.
So i need a way to know how often a spell has been used by a specific unit.

And here is the semi-code for the functions i'd like to get:

Code:
function get_uses takes integer unit, integer ability returns integer uses
Cache <- Get_Cache_For_Unit(unit)
uses <- Get_Integer_By_Index(Cache, ability)
return uses
endfunction

function store_integer takes integer unit, integer ability, integer value returns nothing
Cache <- Get_Cache_For_Unit(unit)
Set_Integer_By_Index(Cache, ability, value)
endfunction

i hope everyone can understand what i want and i definitly look forward for any part of this beeing done for me.

Note:
The names for functions and variables my be different from my semicode.
 
Status
Not open for further replies.
Top