Okay, I searched for it in the editor, but couldn't find it.
Is it possible to use a 'unit' variable as a key for a hashtable?
I will give as example what I am trying to do:
GDD_Event becomes equal to 0.00
Conditions: -----
Actions: Load (Key(Damage)) of (Key(GDD_DamageSource)) from Table
----------
I know I can do it if I set the custom value of the damaging unit to something unique, but I want to do it with a hashtable to avoid changing the unit's value. In a matter of fact - I don't need hastable for it when I'm using the custom value of the unit.
Hmm, fix me if I'm wrong, but "Triggering unit" in GDD is equal to GDD_DamagedUnit, right? If so I guess I could save the "Damage" into the DamagedUnit's cell and load it instead, but then it wouldn't be MUI. If the "writing" event runs again before the unit is damaged - the value will be changed.
Anyways.. I have another question regarding hashtables:
What does "Convert Unit-Type to Order" do? When is it used?
And what is "Units of Type" doing?
(Both of the above are Handles)
If I do: Save Temp_Real as (Key (Range)) of (Key (Units of type Archer)) in Table
Then I have an event, where an Archer is the triggering unit - if I do Set Temp_Real = Load (Key(Range)) of (Key(Units of type (Unit-type of (Triggering unit)))) from Table
Will it load the value I've initially entered?
Is it possible to use a 'unit' variable as a key for a hashtable?
I will give as example what I am trying to do:
GDD_Event becomes equal to 0.00
Conditions: -----
Actions: Load (Key(Damage)) of (Key(GDD_DamageSource)) from Table
----------
I know I can do it if I set the custom value of the damaging unit to something unique, but I want to do it with a hashtable to avoid changing the unit's value. In a matter of fact - I don't need hastable for it when I'm using the custom value of the unit.
Hmm, fix me if I'm wrong, but "Triggering unit" in GDD is equal to GDD_DamagedUnit, right? If so I guess I could save the "Damage" into the DamagedUnit's cell and load it instead, but then it wouldn't be MUI. If the "writing" event runs again before the unit is damaged - the value will be changed.
Anyways.. I have another question regarding hashtables:
What does "Convert Unit-Type to Order" do? When is it used?
And what is "Units of Type" doing?
(Both of the above are Handles)
If I do: Save Temp_Real as (Key (Range)) of (Key (Units of type Archer)) in Table
Then I have an event, where an Archer is the triggering unit - if I do Set Temp_Real = Load (Key(Range)) of (Key(Units of type (Unit-type of (Triggering unit)))) from Table
Will it load the value I've initially entered?