I was just wondering if anybody out there knows how to convert an integer to a string or a string to an integer, hence I'm making a spell that requires the use of a hashtable, and I find it quite confusing when I simply use integers as childKeys...
Here's the spell so far:
Here's the spell so far:
JASS:
function Trig_Bash_Actions takes nothing returns nothing
local unit attackedUnit = GetTriggerUnit()
local unit attackingUnit = GetAttacker()
local real dur = 0
local timer t = CreateTimer()
local integer timerID = GetHandleId( t )
local real moveAngle = Atan2( GetUnitY( attackedUnit ) - GetUnitY( attackingUnit ), GetUnitX( attackedUnit ) -GetUnitX( attackingUnit ) )
local real moveAmount = 2.
local integer abilityLevel = GetUnitAbilityLevel( attackingUnit, 039;A000039; )
call UnitDamageTarget( attackingUnit, attackedUnit, 25 * abilityLevel, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS
call SaveReal( udg_ht_AbilityTable, timerID, 0, dur )
call SaveUnitHandle( udg_ht_AbilityTable, timerID, 1, attackedUnit )
call SaveReal( udg_ht_AbilityTable, timerID, 2, moveAngle )
call SaveReal( udg_ht_AbilityTable, timerID, 3, moveAmount )
call TimerStart( t, 0.01, true, function Trig_Bash_MoveUnit )