hey guys, i've read through several posts in regards to hashtables but nothing has come close to what i'm trying to achieve. as far as i know using a hashtable will be my only solution.
so what i'm trying to do is (forgive the psudo code)
event
cast a spell
cond
spell is shapeshift
shapeshift is lvl 1
action
replace "caster" with "shape 1"
and then they change with more lvls that you have on so like "shapeshift lvl 2" will generate "shape 2" and so on. thats the easy part (and i can just mod Night Elf - Bear Form for that but read on) the hard part is that i set it up so the caster reverts back when the shape's mana reaches 0. (have triggers to reduce its mana) so its like a timer that you can quickly deminsh using skills that cost mana or prolong by using no spells. but when i do "replace "shape" with "caster" the caster come back, same lvl and exp all is good. but he retains none of the spells. i have to repick them all.
so i was hoping that i could save the "caster" into the hashtable and replace the "shape" with the "caster" from the hashtable and that he would keep the spells that he learned (instead of having to repick them all). but i have no clue how to work the hashtable right.
I tried something along the lines of:
hashtable - save unit "caster" as "1" of "1" in "hashtable"
but then i'm pretty much lost from there, cause if i do "replace unit" its only of unit-type, and i tried doing "replace "shape" with a "(unit type of (load - 1 of 1 in hashtable))" and it just removed the "shape" but did not bring in the "caster" .... sooo yeah how would i get this done?
so what i'm trying to do is (forgive the psudo code)
event
cast a spell
cond
spell is shapeshift
shapeshift is lvl 1
action
replace "caster" with "shape 1"
and then they change with more lvls that you have on so like "shapeshift lvl 2" will generate "shape 2" and so on. thats the easy part (and i can just mod Night Elf - Bear Form for that but read on) the hard part is that i set it up so the caster reverts back when the shape's mana reaches 0. (have triggers to reduce its mana) so its like a timer that you can quickly deminsh using skills that cost mana or prolong by using no spells. but when i do "replace "shape" with "caster" the caster come back, same lvl and exp all is good. but he retains none of the spells. i have to repick them all.
so i was hoping that i could save the "caster" into the hashtable and replace the "shape" with the "caster" from the hashtable and that he would keep the spells that he learned (instead of having to repick them all). but i have no clue how to work the hashtable right.
I tried something along the lines of:
hashtable - save unit "caster" as "1" of "1" in "hashtable"
but then i'm pretty much lost from there, cause if i do "replace unit" its only of unit-type, and i tried doing "replace "shape" with a "(unit type of (load - 1 of 1 in hashtable))" and it just removed the "shape" but did not bring in the "caster" .... sooo yeah how would i get this done?