Multiple Question

Bankde

Member
Reaction score
20
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)

JASS:
function Trig_Jass_Version_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A01D' ) ) 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)

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 (Spell_Reju_Index Equal to 0) then do (Countdown Timer - Pause Spell_Reju_Timer) else do (Do nothing)


If they have no difference, is this the main reason we use jass ??

Thank you very much.
 

Laiev

Hey Listen!!
Reaction score
188
1 - I don't think so, if have some, is really large.

2 - Yes and no, yes because if you use for example, 200 trigger with "Unit Start Effect of an ability", all the 200 trigger will run and 200 is greater then 1, no because its mile seconds

3 - No, but you can use other things to check if unit is in a triangle or circlet or anything else (just trigger it)

4 - Jass is more efficient then GUI since GUI is Jass but with user interface. Also in your example in jass you see lots of BJs (red text), they can be changed to natives (purple text) which is more fast then BJs.

Example: I can say to someone to say hi to you by me (BJ) BUT I can say hi to you by myself (Native), of course this is more fast then someone else said to you
 

Bankde

Member
Reaction score
20
For example of my region

Untitled-1.gif

Is it possible to create region like this ?? Trigger is welcome.

Thank Laiev again but I still need to spread some rep :eek:
 

Laiev

Hey Listen!!
Reaction score
188
You want the monster areas? Oo

you can do it with 2 regions... o.o

1 for monster areas and another to fountain... then just use some condition to check if not in fountain area
 

Bankde

Member
Reaction score
20
Still having problem that in the map, the areas are not completely square. I don't want to create about 10 regions for just one area.

Check Condition is good ideas thx.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top