• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Damage Engine not detecting spells

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
I dont know what happened... i was trying to use damage engine to make a make-shift charge that teleports the attacker to the unit with damage but the damage engine doesnt even detect it. As far as i can tell, i only made one change, putting a debug trigger before where it sets the variables and that doesnt show when i use the spell on an enemy.

My damage engine (bribe's)

  • Damage Engine
    • Events
      • Game - UnitIndexEvent becomes Equal to 1.00
      • Game - UnitIndexEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • -------- Copy the Cheat Death Ability from Object Editor into your map and set the following variable respectively: --------
      • Set DamageBlockingAbility = Cheat Death Ability (+500,000)
      • -------- - --------
      • Set DamageTypeSpell = 1
      • Set DamageTypeDOT = 2
      • Set DamageTypeRanged = 3
      • -------- - --------
      • Custom script: call ExecuteFunc("InitDamageEvent")
      • Custom script: endfunction
      • Custom script:
      • Custom script: function DmgEvFilter takes nothing returns boolean
      • -------- - --------
      • -------- The next conditions let you filter out unwanted units. By default, units with Locust will not pass the check. --------
      • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is A structure) Equal to False
        • Then - Actions
          • Custom script: return true
        • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • Custom script:
      • Custom script: function DmgEvRemoveAbilities takes nothing returns nothing
      • Custom script: local real r
      • Custom script: loop
      • Set DmgEvN = (DmgEvN - 1)
      • Custom script: set r = GetWidgetLife(udg_DmgEvStack[udg_DmgEvN])
      • Unit - Remove DamageBlockingAbility from DmgEvStack[DmgEvN]
      • Custom script: call SetWidgetLife(udg_DmgEvStack[udg_DmgEvN], r)
      • Set DmgEvStack[DmgEvN] = No unit
      • Custom script: exitwhen udg_DmgEvN == 0
      • Custom script: endloop
      • Custom script: endfunction
      • Custom script:
      • Custom script: function DmgEvSetVars takes nothing returns nothing
      • Game - Display to (All players) the text: fffffffffffffffff
      • Set DamageEventAmount = (Damage taken)
      • Set DamageEventSource = (Damage source)
      • Set DamageEventTarget = (Triggering unit)
      • Set DamageType = Unknown
      • Custom script: endfunction
      • Custom script:
      • Custom script: function FireDmgEv takes nothing returns nothing
      • Custom script: local boolean b = GetUnitAbilityLevel(udg_DamageEventTarget, udg_DamageBlockingAbility) > 0
      • Custom script: local real life = 0
      • Custom script: local real pain = 0
      • Custom script: if b then
      • Custom script: set life = GetWidgetLife(udg_DamageEventTarget)
      • Unit - Remove DamageBlockingAbility from DamageEventTarget
      • Custom script: call SetWidgetLife(udg_DamageEventTarget, life)
      • Custom script: set pain = GetWidgetLife(udg_DamageEventTarget)
      • Custom script: endif
      • Set DamageEventPrevAmt = DamageEventAmount
      • Set DamageEventExplodesUnit = False
      • Set DamageEventOverride = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAmount Equal to 0.00
        • Then - Actions
          • Set DamageEvent = 2.00
        • Else - Actions
          • Set DamageModifierEvent = 1.00
          • Set DamageEvent = 1.00
      • Custom script: if b then
      • Unit - Add DamageBlockingAbility to DamageEventTarget
      • Custom script: call SetWidgetLife(udg_DamageEventTarget, life + GetWidgetLife(udg_DamageEventTarget) - pain)
      • Custom script: endif
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAmount Not equal to DamageEventPrevAmt
        • Then - Actions
          • Set DmgEvLife = ((Life of DamageEventTarget) + (DamageEventPrevAmt - DamageEventAmount))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DamageEventAmount Greater than DamageEventPrevAmt
            • Then - Actions
              • Unit - Set life of DamageEventTarget to (Max(0.41, DmgEvLife))
              • Custom script: if udg_DmgEvLife <= .405 then
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DamageEventExplodesUnit Equal to True
                • Then - Actions
                  • Unit - Make DamageEventTarget Explode on death
                • Else - Actions
              • Trigger - Turn off DamageEventTrigger
              • Custom script: call UnitDamageTarget(udg_DamageEventSource, udg_DamageEventTarget, 999, false, false, null, null, null)
              • Trigger - Turn on DamageEventTrigger
              • Custom script: endif
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Max life of DamageEventTarget) Less than DmgEvLife
                • Then - Actions
                  • Unit - Add DamageBlockingAbility to DamageEventTarget
                  • Set DmgEvStack[DmgEvN] = DamageEventTarget
                  • Set DmgEvN = (DmgEvN + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DmgEvN Equal to 1
                    • Then - Actions
                      • Custom script: call TimerStart(udg_DmgEvTimer, 0, false, function DmgEvRemoveAbilities)
                    • Else - Actions
                • Else - Actions
              • Unit - Set life of DamageEventTarget to DmgEvLife
        • Else - Actions
      • Custom script: endfunction
      • Custom script:
      • Custom script: function FireRecursiveDmgEv takes nothing returns nothing
      • Custom script: local real d = udg_DamageEventAmount
      • Custom script: local unit s = udg_DamageEventSource
      • Custom script: local unit t = udg_DamageEventTarget
      • Custom script: local integer ptype = udg_DmgTypPrev
      • Custom script: local boolean explode = udg_DamageEventExplodesUnit
      • Custom script: local boolean override = udg_DamageEventOverride
      • Custom script: local real prev = udg_DamageEventPrevAmt
      • Custom script: call DmgEvSetVars()
      • Custom script: if udg_DamageEventTarget != t or udg_DamageEventSource != s or udg_DamageEventAmount != d or udg_DamageEventType != ptype then
      • Set DamageEvent = 0.00
      • Set DamageModifierEvent = 0.00
      • Custom script: call FireDmgEv()
      • -------- - --------
      • -------- Delete the next three lines to disable the in-game recursion crash warnings --------
      • -------- - --------
      • Custom script: else
      • Cinematic - Clear the screen of text messages for (All players)
      • Game - Display to (All players) for 999.00 seconds the text: WARNING: Recursion ...
      • -------- - --------
      • Custom script: endif
      • Custom script: set udg_DamageEventOverride = override
      • Custom script: set udg_DamageEventExplodesUnit = explode
      • Custom script: set udg_DamageEventPrevAmt = prev
      • Custom script: set udg_DmgTypPrev = ptype
      • Custom script: set udg_DamageEventAmount = d
      • Custom script: set udg_DamageEventSource = s
      • Custom script: set udg_DamageEventTarget = t
      • Custom script: set s = null
      • Custom script: set t = null
      • Custom script: endfunction
      • Custom script:
      • Custom script: function OnDmgEv takes nothing returns boolean
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEvent Equal to 0.00
        • Then - Actions
          • Set DmgTypPrev = DamageEventType
          • Custom script: call DmgEvSetVars()
          • Custom script: call FireDmgEv()
          • Set DamageModifierEvent = 0.00
          • Set DamageEvent = 0.00
          • Set DamageEventType = 0
        • Else - Actions
          • Custom script: call FireRecursiveDmgEv()
      • Custom script: return false
      • Custom script: endfunction
      • Custom script:
      • Custom script: function CreateDmgEv takes nothing returns nothing
      • Custom script: set udg_DamageEventTrigger = CreateTrigger()
      • Custom script: call TriggerAddCondition(udg_DamageEventTrigger, Filter(function OnDmgEv))
      • Custom script: endfunction
      • Custom script:
      • Custom script: function SetupDmgEv takes nothing returns boolean
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UnitIndexEvent Equal to 1.00
        • Then - Actions
          • Set TempUnit = UDexUnits[UDex]
          • Custom script: if GetUnitAbilityLevel(udg_TempUnit, 'Aloc') == 0 and DmgEvFilter() then
          • Set UnitDamageRegistered[UDex] = True
          • Trigger - Add to DamageEventTrigger the event (Unit - TempUnit Takes damage)
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UnitDamageRegistered[UDex] Equal to True
            • Then - Actions
              • Set UnitDamageRegistered[UDex] = False
              • Set DamageEventsWasted = (DamageEventsWasted + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DamageEventsWasted Equal to 15
                • Then - Actions
                  • Set DamageEventsWasted = 0
                  • Custom script: call DestroyTrigger(udg_DamageEventTrigger)
                  • Custom script: call CreateDmgEv()
                  • Set UDex = UDexNext[0]
                  • Custom script: loop
                  • Custom script: exitwhen udg_UDex == 0
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UnitDamageRegistered[UDex] Equal to True
                    • Then - Actions
                      • Trigger - Add to DamageEventTrigger the event (Unit - UDexUnits[UDex] Takes damage)
                    • Else - Actions
                  • Set UDex = UDexNext[UDex]
                  • Custom script: endloop
                • Else - Actions
            • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • Custom script:
      • Custom script: function InitDamageEvent takes nothing returns nothing
      • Custom script: call CreateDmgEv()
      • Custom script: call TriggerAddCondition(GetTriggeringTrigger(), Filter(function SetupDmgEv))
      • Set UnitIndexerEnabled = False
      • Custom script: set udg_TempUnit = CreateUnit(Player(15), 'uloc', 0, 0, 0)
      • Set UnitIndexerEnabled = True
      • Unit - Add DamageBlockingAbility to TempUnit
      • Unit - Remove TempUnit from the game
      • Trigger - Run (This trigger) (checking conditions)
My trigger that runs at 0 damage

  • Set Damage Copy
    • Events
      • Game - DamageEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • Custom script: local unit u = udg_DamageEventSource
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Stunned (Pause) (Charging Strike)) Equal to True
        • Then - Actions
          • Set TempLoc = (Position of DamageEventTarget)
          • Set DamageEventAmount = (((Real((Strength of DamageEventSource (Include bonuses)))) x 3.00) x (Real((Level of Charging Strike (|cffffcc00C|r) for DamageEventSource))))
          • Unit - Move DamageEventSource instantly to TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
          • Game - Display to (All players) the text: g
Not only does it not display the "ffffffffff" when setting variables, it doesnt do anything when i use charging strike
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
The unit might not have the buff.

...

why doesnt this run than

  • Game - Display to (All players) the text: fffffffffffffffff
  • Set DamageEventAmount = (Damage taken)
  • Set DamageEventSource = (Damage source)
  • Set DamageEventTarget = (Triggering unit)
  • Set DamageType = Unknown
why doesnt the "else" on the trigger print "g" than?

btw if i change the dmg on the storm bolt from 0 to like 500 i can easily see the changes
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
You could post the map with some test setup.

I might, because im getting a new problem. The entire player doesn't have the damage event! Heres the trigger for damage modifier event

  • Set Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Custom script: local unit u = udg_DamageEventSource
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of DamageEventSource) Equal to Player 1 (Red)
        • Then - Actions
          • Game - Display to (All players) the text: trrrr
        • Else - Actions
      • Set DamageEventAmountDummy = DamageEventAmount
      • -------- temp --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Stunned (Pause) (Charging Strike)) Equal to True
        • Then - Actions
          • Set TempLoc = (Position of DamageEventTarget)
          • Set DamageEventAmount = (((Real((Strength of DamageEventSource (Include bonuses)))) x 3.00) x (Real((Level of Unknown (A03S) for DamageEventSource))))
          • Unit - Move DamageEventSource instantly to TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
          • Game - Display to (All players) the text: g
      • -------- Heated Blade --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Heated Blade T1 WARR for DamageEventSource) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DamageEventSource has buff Heated Blade ) Equal to True
            • Then - Actions
              • Set DamageEventAmount = (DamageEventAmount + ((DamageEventAmountDummy x 0.20) + ((25.00 x (Real((Level of Heated Blade T1 WARR for DamageEventSource)))) + 25.00)))
              • Game - Display to (All players) the text: Stage 2 good
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HeatedBladeAvailable[(Player number of (Owner of DamageEventSource))] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 100) Less than or equal to (10 + ((Level of Heated Blade T1 WARR for DamageEventSource) x 2))
                    • Then - Actions
                      • Set HeatedBladeBool = True
                      • Unit - Add H to DamageEventSource
                      • Countdown Timer - Start HeatedBladeTimer[(Player number of (Owner of DamageEventSource))] as a One-shot timer that will expire in 60.00 seconds
                      • Game - Display to (All players) the text: Stage 4 good
                    • Else - Actions
                      • Game - Display to (All players) the text: Stage 4 bad
                  • Game - Display to (All players) the text: Stage 3 good
                • Else - Actions
                  • Game - Display to (All players) the text: Stage 3 bad
              • Game - Display to (All players) the text: Stage 2 else
          • Game - Display to (All players) the text: Stage 1 good
        • Else - Actions
          • Game - Display to (All players) the text: Stage 1 bad
      • -------- Rending Claws --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventType Equal to 0
          • (Level of DUMMY - RENDING ESSENCE (SPECIAL) for DamageEventSource) Greater than or equal to 1
          • (Random integer number between 1 and 10) Equal to 1
        • Then - Actions
          • Set Temp_Integer = (Integer((DamageEventAmountDummy / 2.00)))
          • Floating Text - Create floating text that reads ((String(Temp_Integer)) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Create floating text that reads ((String(Temp_Integer)) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 23.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Create floating text that reads ((String(Temp_Integer)) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 36.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Create floating text that reads ((String(Temp_Integer)) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 47.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Create floating text that reads ((String(Temp_Integer)) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
          • Set DamageEventAmount = (DamageEventAmount + (DamageEventAmountDummy x 2.50))
        • Else - Actions
      • -------- Vital Organs Critical --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vital Organs T1 ASSA for DamageEventSource) Greater than or equal to 1
          • DamageEventType Equal to 0
          • (Random integer number between 1 and 100) Less than or equal to ((Level of Vital Organs T1 ASSA for DamageEventSource) + 5)
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount + (DamageEventAmountDummy x (1.00 + ((Real((Level of Vital Organs T1 ASSA for DamageEventSource))) x 0.20))))
          • Set ShowCriticalText = True
        • Else - Actions
      • -------- Forged Stone Critical --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of DUMMY - 10% 1.5X CRIT (SPECIAL) for DamageEventSource) Greater than or equal to 1
          • (Random integer number between 1 and 100) Less than or equal to 10
          • DamageEventType Equal to 0
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount + DamageEventAmountDummy)
          • Set ShowCriticalText = True
        • Else - Actions
      • -------- Vital Organs Evasion --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vital Organs T1 ASSA for DamageEventTarget) Greater than or equal to 1
          • DamageEventType Equal to 0
          • (Random integer number between 1 and 100) Less than or equal to ((Level of Vital Organs T1 ASSA for DamageEventTarget) + 5)
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 0.20)
        • Else - Actions
      • -------- Show Critical Text --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShowCriticalText Equal to True
        • Then - Actions
          • Set ShowCriticalText = False
          • Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
        • Else - Actions
      • -------- Turn Off Heated Blade --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeatedBladeBool Equal to True
        • Then - Actions
          • Set HeatedBladeBool = False
          • Wait (3.00 + (0.50 x (Real((Level of Heated Blade T1 WARR for DamageEventSource))))) seconds
          • Custom script: set udg_TempUnit = u
          • Unit - Remove H from (Triggering unit)
        • Else - Actions
only top part matters

It doesnt even display the debug "tmrrrrr" if i get a player unit and go attack someone.

Also, slightly different problem with a customr respawn trigger

  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Neutral Hostile
    • Actions
      • Custom script: local unit u = GetDyingUnit()
      • Custom script: local integer i = GetUnitUserData(u)
      • Custom script: set udg_TempUnit = u
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of TempUnit) Equal to |cffff4500[Boss]|r Bandit Lord (Female)
              • (Unit-type of TempUnit) Equal to |cffff7f50[Semi-Boss]|r Bandit Lord Assistant
              • (Unit-type of TempUnit) Equal to |cff800080[Elite]|r Kobold Head-Cheif
        • Then - Actions
          • Set CV = (Custom value of TempUnit)
          • Game - Display to (All players) for 30.00 seconds the text: ((String((Load CV of 0 from CreepRespawnTable))) + (Load CV of 1 from CreepRespawnTable))
          • Wait 30.00 seconds
          • Custom script: set udg_TempUnit = u
          • Custom script: set udg_CV = i
          • Unit - Create 1 (Unit-type of TempUnit) for Neutral Hostile at (Point((Load CV of 1 from CreepRespawnTable), (Load CV of 2 from CreepRespawnTable))) facing (Load CV of 3 from CreepRespawnTable) degrees
          • Set TempLoc = (Position of (Last created unit))
          • Set TempReal = (X of TempLoc)
          • Set TempReal2 = (Y of TempLoc)
          • Set TempReal3 = (Facing of (Last created unit))
          • Hashtable - Save TempReal as 1 of (Custom value of (Last created unit)) in CreepRespawnTable
          • Hashtable - Save TempReal2 as 2 of (Custom value of (Last created unit)) in CreepRespawnTable
          • Hashtable - Save TempReal3 as 3 of (Custom value of (Last created unit)) in CreepRespawnTable
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Game - Display to (All players) for 30.00 seconds the text: ((String((Load CV of 0 from CreepRespawnTable))) + (Load CV of 1 from CreepRespawnTable))
          • Hashtable - Clear all child hashtables of child (Custom value of TempUnit) in CreepRespawnTable
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Set CV = (Custom value of TempUnit)
              • Game - Display to (All players) for 30.00 seconds the text: ((String((Load CV of 0 from CreepRespawnTable))) + (Load CV of 1 from CreepRespawnTable))
              • Wait 15.00 seconds
              • Custom script: set udg_TempUnit = u
              • Custom script: set udg_CV = i
              • Unit - Create 1 (Unit-type of TempUnit) for Neutral Hostile at (Point((Load CV of 1 from CreepRespawnTable), (Load CV of 2 from CreepRespawnTable))) facing (Load CV of 3 from CreepRespawnTable) degrees
              • Set TempLoc = (Position of (Last created unit))
              • Set TempReal = (X of TempLoc)
              • Set TempReal2 = (Y of TempLoc)
              • Set TempReal3 = (Facing of (Last created unit))
              • Hashtable - Save TempReal as 1 of (Custom value of (Last created unit)) in CreepRespawnTable
              • Hashtable - Save TempReal2 as 2 of (Custom value of (Last created unit)) in CreepRespawnTable
              • Hashtable - Save TempReal3 as 3 of (Custom value of (Last created unit)) in CreepRespawnTable
              • Custom script: call RemoveLocation(udg_TempLoc)
              • Game - Display to (All players) for 30.00 seconds the text: ((String((Load CV of 0 from CreepRespawnTable))) + (Load CV of 1 from CreepRespawnTable))
              • Hashtable - Clear all child hashtables of child (Custom value of TempUnit) in CreepRespawnTable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                • Then - Actions
                • Else - Actions
above spawns at center of playable map area and debugs always return 0
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Where do you init the respawn system? Is the hashtable initialized?

I know im combining threads here but whatever.

the init for the hash

  • GetIndex
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set CreepRespawnTable = (Last created hashtable)
      • Set Temp_UnitGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in Temp_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Neutral Hostile
            • Then - Actions
              • Set TempLoc = (Position of (Picked unit))
              • Set TempReal = (X of TempLoc)
              • Hashtable - Save TempReal as 1 of (Custom value of (Picked unit)) in (Last created hashtable)
              • Set TempReal = (Y of TempLoc)
              • Hashtable - Save TempReal as 2 of (Custom value of (Picked unit)) in (Last created hashtable)
              • Set TempReal = (Facing of (Picked unit))
              • Hashtable - Save TempReal as 3 of (Custom value of (Picked unit)) in (Last created hashtable)
              • Custom script: call RemoveLocation(udg_TempLoc)
            • Else - Actions
              • Unit Group - Remove (Picked unit) from Temp_UnitGroup
      • Custom script: call DestroyGroup(udg_Temp_UnitGroup)
also, is there a way to scale special effects without dummy units?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
i got problem with damage detection only if:

1. Damage was 0, example

make triggering unit udg_dmg to spelltarget

if this dmg variable = 0 then dont show the damage

2. if damage is negative

if u put something like this to ur trigger then also dont work?

if DamageEventAmount <= 0 then
set DamageEventAmount = 0.01
endif
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
i got problem with damage detection only if:

1. Damage was 0, example

make triggering unit udg_dmg to spelltarget

if this dmg variable = 0 then dont show the damage

2. if damage is negative

if u put something like this to ur trigger then also dont work?

if DamageEventAmount <= 0 then
set DamageEventAmount = 0.01
endif

?

please post in your native language, because your english = ..

couldn't understand a lick of that. the system is buillt to detect 0 damage and negative damage
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
You'd always need dummy units to scale special effects.

Can you please upload a test map with some simple elements? I just tested it with the current Damage Engine and it works just fine for something like Faerie Fire.

Its not a special effect but rather than an attachment. I can do it with the item capture the flag ability too but that doesnt scale either so im wondering how to do it without making the dummy unit, setting the height correctly, and ordering it to follow..
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Steps to Produce

1) start with always vis on
2) Go to the circle to choose the hero and notice the teeny tiny wings
3) Hit the damage target and notice that it doesnt trigger
4) Go into the cave in the topleft of the town and kill rats and notice that it triggers when rat attacks hero and hero attacks rat
5) Say "berer" to get ur hero pimp and go down the ramp to attack kobolds
6) Notice how kobolds attacking you produces the debug but you attacking kobold doesnt
7) Notice how the kobold respawn in the middle of the ocean after 15 seconds
 

Attachments

  • Salvation RPG.w3x
    4.9 MB · Views: 36
Level 17
Joined
Nov 13, 2006
Messages
1,814
when i tryed modify a bit the set damage trigger then WE jngp save the map without error, wc3 started but i cant start the map idk why but anyway i got a question, what happen if u put a simple
  • Game - Display to (All players) the text: (String(DamageEventAmount))
at end of the set damage trigger?

coz there alot if (also most of them got condition with DamageEventType mmust be 0 or unit got ability or something)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
idk what your saying shadow, i load the map just fine.

anyway, this isnt a problem with my map its with the damage engine not registering pre-placed units (in the above instructions, the reasons the rats returned the debug is because they are trigger placed)

I contacted bribe about it
 
Status
Not open for further replies.
Top