Maybe you dont understand what trigger events are.
You have 3 events on your damage trigger.
-
Time - Every 1.20 seconds of game time
-
Time - Every ((250.00 - (Real((Intelligence of Holy Knight 0047 <gen> (Include bonuses))))) / 100.00) seconds of game time
-
Time - Every (3.00 - ((Real((Intelligence of Holy Knight 0047 <gen> (Include bonuses)))) / 100.00)) seconds of game time
This means that every time any of those are called, your trigger runs.
So this trigger will run every 1,2 seconds
and this trigger will run every 3 - (formula) seconds
and this trigger will run every (250 / (formula) seconds.
For example I have a hero with 50 intelligence.
Then that trigger runs every 1.2 seconds
and that trigger runs every 2 seconds ((250 -
50) / 100)
and that trigger runs every 1 seconds. (3 - (
50 / 100))
if you calculate those things then you see that per second this trigger is called
0,83 X per second
0,5 X per second
1 X per second
So that trigger will run 2,33 times per second with random intervals.
And if you have 2 of those (it seems you have 2) then it will be 4,66 times per second with random intervals.
I guess that that is what your problem was.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
I strongly suggest making a loop where a unit deals damage to a unit with a polled wait time calculated to the intelligence.
Ofcouse you have to do that in JASS if you want it to be flawless but it is quite simple.
Let it run on Map Initialization.
Set a local unit variable target and hero to the target unit and the hero that deals the damage.
Then make a loop with the damage event and a polled wait and let it stop when the target unit is dead (or whatever you want.) Also stop it when the hero is dead.
kinda like this:
JASS:
function DamageTarget takes nothing returns nothing
local unit target = gg_unit_n00A_0047
local unit hero = gg_unit_n00A_0047
loop
call PolledWait(3 - (I2R(GetHeroInt(hero)) / 100))
call UnitDamageTargetBJ(hero, target, (I2R(GetHeroInt(hero)) * 1), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC)
exitwhen (GetUnitStateSwap(UNIT_STATE_LIFE, target) < 1)
exitwhen (GetUnitStateSwap(UNIT_STATE_LIFE, hero) < 1)
endloop
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger()
call TriggerAddAction(gg_trg_Untitled_Trigger_001, function DamageTarget)
endfunction
You can make this trigger without any problem.
Just make a GUI trigger without events or conditions.
For actions do Kill Unit (hero) and Kill Unit (target)
So it will look like this:
-
Untitled Trigger 002
-
Events
-
Conditions
-
Actions
-
Unit - Kill Dummy 2 0278 <gen>
-
Unit - Kill Dummy Villager (Male 2) 0000 <gen>
Then select that trigger in the list of triggers on the left side of the screen and go to Edit - Convert to custom text (it is in the menu on top of the screen.)
Then your trigger is made in JASS.
JASS:
call KillUnit( gg_unit_h00T_0278 )
call KillUnit( gg_unit_n000_0000 )
Then you see the call KillUnit actions. Copy the "gg_unit_aaaa_0000" from those. They are the unit.
Set those to the local unit gg_unit_fasf_9401 in the trigger i showed before.
This should work.