• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

This trigger kills my game

Level 9
Joined
Sep 10, 2022
Messages
141
Hello everyone, I am stuck with something I cannot solve with anything.

I have the trigger that casts custom rejunevation every time I threw an acid bomb of the alchemist that I made into the Healing Bomb.

Here is the trigger:
  • Healing Bomb New
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Healing Bomb
    • Actions
      • Custom script: local unit caster = GetTriggerUnit()
      • Custom script: local unit target = GetSpellTargetUnit()
      • Custom script: local real dx = GetUnitX(target) - GetUnitX(caster)
      • Custom script: local real dy = GetUnitY(target) - GetUnitY(caster)
      • Custom script: local real dist = SquareRoot(dx * dx + dy * dy)
      • Custom script: local integer lvl = GetUnitAbilityLevel(caster, 'A02O')
      • Custom script: local real targetX
      • Custom script: local real targetY
      • Custom script: local group g
      • Custom script: local unit u
      • Custom script: local unit dummy
      • Custom script: call TriggerSleepAction(dist / 700.0)
      • Custom script: set targetX = GetUnitX(target)
      • Custom script: set targetY = GetUnitY(target)
      • Custom script: set g = CreateGroup()
      • Custom script: call GroupEnumUnitsInRange(g, targetX, targetY, 200.0, null)
      • Custom script: loop
      • Custom script: set u = FirstOfGroup(g)
      • Custom script: exitwhen u == null
      • Custom script: call GroupRemoveUnit(g, u)
      • Custom script: if IsUnitAliveBJ(u) and IsUnitAlly(u, GetOwningPlayer(caster)) then
      • Custom script: set dummy = CreateUnit(GetOwningPlayer(caster), 'h002', targetX, targetY, 0)
      • Custom script: call UnitAddAbility(dummy, 'A02Q')
      • Custom script: call SetUnitAbilityLevel(dummy, 'A02Q', lvl)
      • Custom script: call IssueTargetOrder(dummy, "rejuvination", u)
      • Custom script: call UnitApplyTimedLife(dummy, 'BTLF', 2.0)
      • Custom script: endif
      • Custom script: endloop
      • Custom script: call DestroyGroup(g)
      • Custom script: set caster = null
      • Custom script: set target = null
      • Custom script: set g = null
      • Custom script: set u = null
      • Custom script: set dummy = null
So, something completely new is happening: at the beginning of the game, everything is fine and the script works. But as soon as my hero reaches level 4 or 5 (timing around 9 minute), regardless of whether they have a level 1 or 3 ability left, the game simply freezes during a certain cast of this spell, and I have to destroy it through the task manager.

Key points:

The healing bomb is based on the alchemist's bomb; I set the damage to 0 and the armor reduction to 0.

When the bomb lands, I create a dummy unit that applies rejuvenation of durid of the claw and then destroys it.

I tried changing the duration of the acid bomb itself—from 0.01 (because I didn't want the bomb buff to linger) to the default value of 16, but it didn't help. I'm at a loss as to what the problem could be.

There are other custom spells on the map I ported to, but since I created a trigger that works off of local variables, there shouldn't be any conflicts.
 
Did you change the value in these lines?

1780590005523.webp


I've learned that an interval of 0 usually means infinity damage and WC3 doesn't like that at all
 
Did you change the value in these lines?

View attachment 593532

I've learned that an interval of 0 usually means infinity damage and WC3 doesn't like that at all


Yes, it seems the problem was in my acid bomb where I set Damage Interval to ZERO. Still I wonder how it did not crush Warcraft 3 at the start of the game...
 
Back
Top