yet another hashtable request

Rathma666

New Member
Reaction score
0
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? :(
 

Rathma666

New Member
Reaction score
0
forgot that i could copy the triggers to text

Golem Form lvl 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Golem Form
(Level of Golem Form for (Triggering unit)) Equal to 1
Actions
Hashtable - Save Handle Of(Triggering unit) as 1 of 1 in Heroes
Unit - Replace (Triggering unit) with a Geomancer (Golem Form) using The new unit's max life and mana
Set Geo_Golem = (Last replaced unit)
Trigger - Turn on Golem Drain <gen>
Trigger - Turn on Golem Expire <gen>
Trigger - Add to Golem Expire <gen> the event (Unit - Geo_Golem's mana becomes Less than or equal to 0.00)

Golem Drain
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit - Set mana of Geo_Golem to ((Mana of Geo_Golem) - 1.00)

Golem Expire
Events
Conditions
(Triggering unit) Equal to Geo_Golem
Actions
Unit - Replace (Triggering unit) with a (Unit-type of (Load 1 of 1 in Heroes)) using The old unit's relative life and mana
Set Geo_Golem = No unit


So using that , it turns into the golem, but reverting back, it just removes the golem and there is nothing there. also i noticed "with a (UNIT-TYPE of" so thats not even recalling the hero i want himself... just the type of unit he is (which doesnt work anyways)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top