Help with this trigger

brc

New Member
Reaction score
1
This is the trigger for my spell blaze. Basically, whenever the hero runs, flames are left behind for 5 seconds and burns anyone who touches it. The problem is that setting the level of immolation for my dummy units doesn't work. Even if the spell blaze on my hero is lvl 4 the perm immolation on my dummies are still level 1. Can anyone help me fix this?
Code:
Blaze
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Blaze 
    Actions
        Set Blaze_Caster = (Triggering unit)
        Set Blaze_Spell_Level = (Level of Blaze  for Blaze_Caster)
        For each (Integer A) from 1 to 18, do (Actions)
            Loop - Actions
                Set Blaze_Position1 = (Position of Blaze_Caster)
                Wait 0.03 seconds
                Set Blaze_Position2 = (Position of Blaze_Caster)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Region centered at Blaze_Position1 with size (1.00, 1.00)) contains Blaze_Position2) Equal to False
                    Then - Actions
                        Unit - Create 1 Blaze Dummy for (Owner of Blaze_Caster) at Blaze_Position2 facing Default building facing degrees
                        Set Blaze_Dummy = (Last created unit)
                        Unit - Set level of Dummy Burn  for Blaze_Dummy to Blaze_Spell_Level
                        Unit - Add a 5.00 second Generic expiration timer to Blaze_Dummy
                        Custom script:   set udg_Blaze_Dummy = null
                        Custom script:   call RemoveLocation (udg_Blaze_Position1)
                        Custom script:   call RemoveLocation (udg_Blaze_Position2)
                    Else - Actions
        Custom script:   set udg_Blaze_Caster= null

Also is this trigger leakless?:D Thanks.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
1) Waits inside loops are bad (I believe, I forget GUI a bit)
2) 5.00 second timer isn't needed to be that large.
3) Read this.
 

brc

New Member
Reaction score
1
So how do i fix the level of my dummies' immolation problem? And next time ill have a better title. lol Thanks.
 

Kahiera

Active Member
Reaction score
9
im not sure, but i believe i've read this somewhere: perm immolation cannot be leveled...
 

Kelvin87

New Member
Reaction score
14
You know little jass script? I think you are advised to use local variable in this case instead of global variable because global variable tends to change the value that you assigned to it when you perform another same Trigger action. for example:
Code:
local unit Blaze_Caster = GetSpellAbilityUnit()
local integer Blaze_Spell_Level = GetUnitAbilityLevel(Blaze_Caster, 'A000') 
//A000 can be changed to the id for your Hero Blaze
......
call SetUnitAbilityLevel( bj_lastCreatedUnit, 'A001', Blaze_Spell_Level )
//A001 can be changed to the id for your dummy Dummy Burn

[Note]:** the spell id can use ctrl + d to check it (in object editor)
 

Kelvin87

New Member
Reaction score
14
im not sure, but i believe i've read this somewhere: perm immolation cannot be leveled...

As you say like that, if the permanent immolation cannot use, then you can replace it to "Building Damage Aura" to perform the ability. If it is ok, then fine.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top