1. Is there the limit of triggers ??
2. Is the same event on other triggers cause game more lag ??
3. Is there a way to set region not in square shape ?? (I don't want to create 2 region as it will complicate my trigger)
4. What is difference between: (Rather than that Heal per milliseconds)
and
If they have no difference, is this the main reason we use jass ??
Thank you very much.
2. Is the same event on other triggers cause game more lag ??
3. Is there a way to set region not in square shape ?? (I don't want to create 2 region as it will complicate my trigger)
4. What is difference between: (Rather than that Heal per milliseconds)
JASS:
function Trig_Jass_Version_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A01D039; ) ) then
return false
endif
return true
endfunction
function Trig_Jass_Version_Actions takes nothing returns nothing
local unit Target = GetSpellTargetUnit()
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellTargetUnit(), "Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl" )
call DestroyEffect( GetLastCreatedEffectBJ() )
call AddSpecialEffectTargetUnitBJ( "body", GetSpellTargetUnit(), "Abilities\\Spells\\NightElf\\TargetArtLumber\\TargetArtLumber.mdl" )
call DestroyEffect( GetLastCreatedEffectBJ() )
call SetUnitLifeBJ( Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, null) + I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true)) ) )
call TriggerSleepAction( 1.00 )
call SetUnitLifeBJ( Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, null) + I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true)) ) )
call TriggerSleepAction( 1.00 )
call SetUnitLifeBJ( Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, null) + I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true)) ) )
call TriggerSleepAction( 1.00 )
call SetUnitLifeBJ( Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, null) + I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true)) ) )
call TriggerSleepAction( 1.00 )
call SetUnitLifeBJ( Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, null) + I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true)) ) )
endfunction
//===========================================================================
function InitTrig_Jass_Version takes nothing returns nothing
set gg_trg_Jass_Version = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jass_Version, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Jass_Version, Condition( function Trig_Jass_Version_Conditions ) )
call TriggerAddAction( gg_trg_Jass_Version, function Trig_Jass_Version_Actions )
endfunction
and
Trigger:
- Skill Rejuvenation
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Rejuvenation
- Actions
- Set Spell_Reju_Index = (Spell_Reju_Index + 1)
- Set Spell_Reju_Unit[Spell_Reju_Index] = (Target unit of ability being cast)
- Set Spell_Reju_HealAmount[Spell_Reju_Index] = ((Real((Intelligence of (Casting unit) (Include bonuses)))) / 10.00)
- Set Spell_Reju_Duration[Spell_Reju_Index] = 5.00
- Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the body of (Target unit of ability being cast) using Abilities\Spells\NightElf\TargetArtLumber\TargetArtLumber.mdl
- Set Spell_Reju_Effect[Spell_Reju_Index] = (Last created special effect)
- If (Spell_Reju_Index Equal to 1) then do (Countdown Timer - Start Spell_Reju_Timer as a Repeating timer that will expire in 0.10 seconds) else do (Do nothing)
- Events
Trigger:
- Skill Rejuvenation Effect
- Events
- Time - Spell_Reju_Timer expires
- Conditions
- Actions
- For each (Integer Spell_Reju_LoopIndex) from 1 to Spell_Reju_Index, do (Actions)
- Loop - Actions
- Unit - Set life of Spell_Reju_Unit[Spell_Reju_LoopIndex] to ((Life of Spell_Reju_Unit[Spell_Reju_LoopIndex]) + Spell_Reju_HealAmount[Spell_Reju_LoopIndex])
- Set Spell_Reju_Duration[Spell_Reju_LoopIndex] = (Spell_Reju_Duration[Spell_Reju_LoopIndex] - 0.10)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Spell_Reju_Duration[Spell_Reju_LoopIndex] Less than or equal to 0.00
- Then - Actions
- Set Spell_Reju_Unit[Spell_Reju_LoopIndex] = Spell_Reju_Unit[Spell_Reju_Index]
- Set Spell_Reju_HealAmount[Spell_Reju_LoopIndex] = Spell_Reju_HealAmount[Spell_Reju_Index]
- Set Spell_Reju_Duration[Spell_Reju_LoopIndex] = Spell_Reju_Duration[Spell_Reju_Index]
- Special Effect - Destroy Spell_Reju_Effect[Spell_Reju_LoopIndex]
- Set Spell_Reju_Effect[Spell_Reju_LoopIndex] = Spell_Reju_Effect[Spell_Reju_Index]
- Set Spell_Reju_Index = (Spell_Reju_Index - 1)
- Set Spell_Reju_LoopIndex = (Spell_Reju_LoopIndex - 1)
- Else - Actions
- If - Conditions
- Loop - Actions
- If (Spell_Reju_Index Equal to 0) then do (Countdown Timer - Pause Spell_Reju_Timer) else do (Do nothing)
- For each (Integer Spell_Reju_LoopIndex) from 1 to Spell_Reju_Index, do (Actions)
- Events
If they have no difference, is this the main reason we use jass ??
Thank you very much.