• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Lightning Fade Time

Status
Not open for further replies.
doing periodic from scratch might actually end up like you doing what defskull's GUI Lightning system already does...

also, it's better to just use them as they're already proven to be working good... +you just might suddenly realize that you actually needed the other capabilities of a certain system...

anyway, ultimately it's your call...
 
Level 18
Joined
May 11, 2012
Messages
2,103
doing periodic from scratch might actually end up like you doing what defskull's GUI Lightning system already does...

also, it's better to just use them as they're already proven to be working good... +you just might suddenly realize that you actually needed the other capabilities of a certain system...

anyway, ultimately it's your call...

changed my mind, I'm gonna remake the spell (Got very cool idea :D)
No need for fade time :D
 
Level 18
Joined
May 11, 2012
Messages
2,103
you know what, my idea was too hard to do...
So I decided to use Lightning System :D

anyway, I have some trouble with my trigg:

  • Storm Shield Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set StormShield_TrigUnitPoint = (Position of StormShield_TrigUnit)
      • Set StormShield_UnitGroup = (Units within 350.00 of StormShield_TrigUnitPoint)
      • Unit Group - Pick every unit in StormShield_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is dead) Not equal to True
              • ((Picked unit) belongs to an enemy of (Owner of StormShield_TrigUnit)) Equal to True
            • Then - Actions
              • Set StormShield_EnemyUnit = (Picked unit)
              • Set StormShield_EnemyUnitPoint = (Position of StormShield_EnemyUnit)
              • Set LH_DurationSet = 0.10
              • Set LH_LightningNameSet = CLSB
              • Set LH_UnitSourceSet = StormShield_TrigUnit
              • Set LH_UnitTargetSet = StormShield_EnemyUnit
              • Trigger - Run LH Unit2Unit <gen> (ignoring conditions)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Storm Shield for StormShield_TrigUnit) Equal to 1
                • Then - Actions
                  • Unit - Cause StormShield_TrigUnit to damage StormShield_EnemyUnit, dealing 650.00 damage of attack type Spells and damage type Normal
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Storm Shield for StormShield_TrigUnit) Equal to 2
                    • Then - Actions
                      • Unit - Cause StormShield_TrigUnit to damage StormShield_EnemyUnit, dealing 1550.00 damage of attack type Spells and damage type Normal
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_StormShield_EnemyUnitPoint)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_StormShield_TrigUnitPoint)
      • Custom script: call DestroyGroup(udg_StormShield_UnitGroup)
THIS isn't working... It picks dead units too.... WHY?
  • ((Picked unit) is dead) Not equal to True
and not only in that trigger... Other triggers also pick dead units even tho I have the condition Not to pick dead units
 
Level 18
Joined
May 11, 2012
Messages
2,103
At this point you should try (Picked Unit) is dead equal to False)) or maybe try using And - conditions in the if-conditions.

Maybe you should add a stop trigger in the Else actions that stops the spell when Number of Units in Group == null/dead.

Hope this helps =)

same.... still same -.-
Idk why my map does that? what couses coditions to fail? I mean, wtf?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
I've had this problem before... try using Almia's debug log to find the problem or maybe try to remove the condition that's causing the problem and see if it still works.

Or maybe you should also try putting the (Picked Unit) is dead) condition in the main condition part of the trigger below the Event- Every 0.05 seconds...
 
Level 18
Joined
May 11, 2012
Messages
2,103
I've had this problem before... try using Almia's debug log to find the problem or maybe try to remove the condition that's causing the problem and see if it still works.

Or maybe you should also try putting the (Picked Unit) is dead) condition in the main condition part of the trigger below the Event- Every 0.05 seconds...

yeah...
I'll see if I can work around dead units somehow..
 
The problem is that the "Is unit dead" condition just checks the life of dead units.
There are certain abilities that can "heal" dead units, raising their life above 0, even though they are dead.

The only safe way to detect wether a unit is alive is this:
  • Set TempUnit = SomeUnit
  • Set TempBool = false
  • Custom script: if GetUnitTypeId(udg_TempUnit) != 0 and not IsUnitType(udg_TempUnit, UNIT_TYPE_DEAD) then
  • Custom script: set udg_TempBool = true
  • Custom script: endif
TempBool is true if the unit is alive, false if not.
 
Status
Not open for further replies.
Top