Hi,
So I made a bunch of new heroes in my map and first I thought they were the ones causing a major glitch and crashing, but I am beginning to think it's caused by major leaks in my data generation. Because these heroes have a lot of triggers firing every 0.25 seconds making multiple groups and stuff.
Would you mind taking a look at it to maybe detect something I am not able to find myself?
This trigger fires every 0.25 seconds, first finding the players one and unique Hero (no MUI needed), places a dummy unit (Beast) to do -armor aura in the area. Then I calculate damage depending on buffs and damage a group of units and a primary target. Does it leak?
This second trigger does pretty much the same but just damage everyone in a target area.
I have another example of a healing spray ability that does a lot of stuff every 0.25 seconds.
Do you find anything I am overseeing regarding to crashing or leaking?
So I made a bunch of new heroes in my map and first I thought they were the ones causing a major glitch and crashing, but I am beginning to think it's caused by major leaks in my data generation. Because these heroes have a lot of triggers firing every 0.25 seconds making multiple groups and stuff.
Would you mind taking a look at it to maybe detect something I am not able to find myself?
This trigger fires every 0.25 seconds, first finding the players one and unique Hero (no MUI needed), places a dummy unit (Beast) to do -armor aura in the area. Then I calculate damage depending on buffs and damage a group of units and a primary target. Does it leak?
-
Rifleman Beast Channel
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Unit) Equal to Rifleman
-
Then - Actions
- Set VariableSet Unit1 = Unit
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Rifleman_Beast is alive) Equal to True
- (Unit1 is alive) Equal to True
- Then - Actions
-
Else - Actions
- Trigger - Turn off (This trigger)
- Skip remaining actions
-
If - Conditions
- Set VariableSet Integer = (Agility of Unit1 (Include bonuses))
- Set VariableSet Real = ((Real(Integer)) x 0.20)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero[(Player number of (Owner of Unit1))] has buff Rifleman (Upgrade)) Equal to True
-
Then - Actions
- Set VariableSet Integer = (Level of Rifleman R for Unit1)
- Set VariableSet Real1 = (0.20 x (Real(Integer)))
- Set VariableSet Real1 = (Real1 + 1.00)
- Set VariableSet Real = (Real x Real1)
- Else - Actions
-
If - Conditions
- Set VariableSet PointDefault = (Position of Rifleman_Beast)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 200.00 of PointDefault.) and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit is alive) Equal to True
- (Owner of Unit) Equal to Player 12 (Brown)
- Unit Not equal to Rifleman_Beast
-
Then - Actions
- Set VariableSet PointDefault1 = (Position of Unit)
- Special Effect - Create a special effect at PointDefault1 using Abilities\Weapons\Rifle\RifleImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_PointDefault1)
- Unit - Cause Unit1 to damage Unit, dealing Real damage of attack type Normal and damage type Normal
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation (udg_PointDefault)
- Set VariableSet Integer = (Base Damage of Unit1 for weapon index 1)
- Set VariableSet Real = (Real(Integer))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero[(Player number of (Owner of Unit1))] has buff Rifleman (Upgrade)) Equal to True
-
Then - Actions
- Set VariableSet Integer = (Level of Rifleman R for Unit1)
- Set VariableSet Real1 = (0.20 x (Real(Integer)))
- Set VariableSet Real1 = (Real1 + 1.00)
- Set VariableSet Real = (Real x Real1)
- Else - Actions
-
If - Conditions
- Unit - Cause Unit1 to damage Rifleman_Beast, dealing Real damage of attack type Normal and damage type Normal
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Events
This second trigger does pretty much the same but just damage everyone in a target area.
-
Rifleman Suppressive Fire Channel
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Unit) Equal to Rifleman
-
Then - Actions
- Set VariableSet Unit1 = Unit
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Rifleman_EDummyUnit is alive) Equal to True
- Then - Actions
-
Else - Actions
- Trigger - Turn off (This trigger)
- Skip remaining actions
-
If - Conditions
- Set VariableSet Integer1 = (Agility of Unit1 (Include bonuses))
- Set VariableSet Real = ((Real(Integer1)) x 2.00)
- Set VariableSet Integer = (Level of Rifleman E for Unit1)
- Set VariableSet Integer = (Integer x 25)
- Set VariableSet Real = (Real + (Real(Integer)))
- Set VariableSet Real = (Real / 24.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero[(Player number of (Owner of Unit1))] has buff Rifleman (Upgrade)) Equal to True
-
Then - Actions
- Set VariableSet Integer = (Level of Rifleman R for Unit1)
- Set VariableSet Real1 = (0.20 x (Real(Integer)))
- Set VariableSet Real1 = (Real1 + 1.00)
- Set VariableSet Real = (Real x Real1)
- Else - Actions
-
If - Conditions
- Set VariableSet PointDefault = (Position of Rifleman_EDummyUnit)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 300.00 of PointDefault.) and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit is alive) Equal to True
- (Owner of Unit) Equal to Player 12 (Brown)
- (Unit has buff Rifleman (Suppressive Fire)) Equal to True
-
Then - Actions
- Set VariableSet PointDefault1 = (Position of Unit)
- Special Effect - Create a special effect at PointDefault1 using Abilities\Weapons\Rifle\RifleImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_PointDefault1)
- Unit - Cause Unit1 to damage Unit, dealing Real damage of attack type Normal and damage type Normal
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation (udg_PointDefault)
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Events
I have another example of a healing spray ability that does a lot of stuff every 0.25 seconds.
-
Furbolg Healing Waves Periodic
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Unit) Equal to Furbolg
-
Then - Actions
- Set VariableSet Player = (Owner of Unit)
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Set VariableSet Integer = (Level of Furbolg E for Hero[(Player number of Player)])
- Set VariableSet Integer1 = (Intelligence of Hero[(Player number of Player)] (Include bonuses))
- Set VariableSet Real = ((Real(Integer1)) x 0.12)
- Set VariableSet Real1 = (10.00 x (Real(Integer)))
- Set VariableSet Real = (Real + Real1)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 250.00 of Point_FurbolgHealingWaves.) and do (Actions)
-
Loop - Actions
- Set VariableSet Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit is alive) Equal to True
- (Owner of Unit) Not equal to Player 12 (Brown)
-
Then - Actions
- Set VariableSet PointDefault = (Position of Unit)
- Special Effect - Create a special effect at PointDefault using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_PointDefault)
- Unit - Set life of Unit to ((Life of Unit) + Real)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
-
Events
Do you find anything I am overseeing regarding to crashing or leaking?
Attachments
Last edited: