#1
Trigger Unit Attack
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to AD&D Hero 0000 <gen>
Actions
Trigger - Turn off (This trigger)
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 1.00)
Set DamageP[1] = (Random integer number between WeaponMinDamageP[1] and WeaponMaxDamageP[1])
Floating Text - Create floating text that reads (String(DamageP[1])) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set DamageInfoP[1] = (Last created floating text)
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) - (Real(DamageP[1])))
Wait (10.00 / (Real((Agility of AD&D Hero 0000 <gen> (Include bonuses))))) seconds
Floating Text - Destroy DamageInfoP[1]
Trigger - Turn on (This trigger)Heh, and how do you want to put value in condition withouth variable? Variables are your friends and it is really easy - imo easiest than write your last post
i make a small lil unit and put it anywhere in the make, then i make a item with 100charge
Unit - Set the custom value of UNIT to ((Custom value of UNIT)) + 1)
function game_cache takes nothing returns gamecache
if (udg_gamecache==null) then
call FlushGameCache(InitGameCache("hax.w3v"))
set udg_gamecache=InitGameCache("hax.w3v")
endif
return udg_gamecache
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(game_cache(),I2S(H2I(subject)),name)
else
call StoreInteger(game_cache(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(game_cache(), I2S(H2I(subject)), name)
endfunctionor if a unit do his own damage
Damage Taken using Event - Unit takes Damagefunction GetHandleReal... Store Reals instead of Integers