• 🏆 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!

Leak problem on spell

Status
Not open for further replies.
Level 4
Joined
Mar 6, 2007
Messages
73
Walking
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Fire Walk for (Picked unit)) Greater than 0
Then - Actions
Unit - Move dumychecker[(Player number of (Triggering player))] instantly to (Position of (Picked unit))
Else - Actions

Causing Fire
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Picked unit)) and (Position of dumychecker[(Player number of (Triggering player))])) Greater than 0.01
(Level of Fire Walk for (Picked unit)) Greater than 0
Then - Actions
Unit - Create 1 Immolation Dummy for (Owner of (Picked unit)) at (Position of dumychecker[(Player number of (Triggering player))]) facing (Random real number between 0.00 and 360.00) degrees
Unit - Set Level of Permanent Immolation (Fire Walk) for (Last created unit) to (Level of Fire Walk for (Picked unit))
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Else - Actions
Do nothing

Learn
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Fire Walk
Actions
Unit - Create 1 Checkdummy for (Owner of (Learning Hero)) at (Position of (Learning Hero)) facing Default building facing (270.0) degrees
Set dumychecker[(Player number of (Triggering player))] = (Last created unit)
Trigger - Turn off (This trigger)

Whats wrong with it? Cuz it leaks and make my comp lag like hell. Plz help.
 
Level 14
Joined
Jan 15, 2007
Messages
349
I think now its leakless.

  • Walking
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Level of Fire Walk for (Picked unit)) Greater than 0
            • Then - Actions
              • Set location = (Position of (Picked unit))
              • Unit - Move dumychecker[(Player number of (Triggering player))] instantly to location
              • Custom script: call RemoveLocation(udg_location)
            • Else - Actions
  • Causing Fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set location2 = (Position of dumychecker[(Player number of (Triggering player))])
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set location = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between location and location2) Greater than 0.01
              • (Level of Fire Walk for (Picked unit)) Greater than 0
            • Then - Actions
              • Unit - Create 1 Immolation Dummy for (Owner of (Picked unit)) at location2 facing (Random real number between 0.00 and 360.00) degrees
              • Unit - Set level of Permanent Immolation (Fire Walk) for (Last created unit) to (Level of Fire Walk for (Picked unit))
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_location)
      • Custom script: call RemoveLocation(udg_location2)
  • Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Fire Walk
    • Actions
      • Set location = (Position of (Triggering unit))
      • Unit - Create 1 CheckDummy for (Owner of (Triggering unit)) at location facing Default building facing (270.0) degrees
      • Set dumychecker[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Custom script: call RemoveLocation(udg_location)
      • Trigger - Turn off (This trigger)
I hope I helped you.
 
Last edited:
Level 4
Joined
Mar 6, 2007
Messages
73
I dunno how to use trigger tag AND Hanky, your custom script are not working, i tried them and an "Expect a name" error message appear.
 
Status
Not open for further replies.
Top