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

[Trigger] Can't find damn leak x_x

Status
Not open for further replies.
Level 10
Joined
Aug 15, 2008
Messages
720
I made this very simple spell, but when I cast it, fps goes down and after some 5 casts fps is like 7-15. I suspect it was leak, but I can't really find it.

  • Ability Homing Missiles
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ABILITY[2]
    • Actions
      • Set Unit_Temp = (Triggering unit)
      • Set Point_Temp = (Position of Unit_Temp)
      • -------- ------------------------------ --------
      • Set UGroup_Temp = (Units within 8000.00 of Point_Temp)
      • Unit Group - Pick every unit in UGroup_Temp and do (Actions)
        • Loop - Actions
          • Set Point_Temp2 = (Position of (Picked unit))
          • Unit - Create 1 Dummy - General for (Owner of Unit_Temp) at Point_Temp facing Default building facing degrees
          • Unit - Add Dummy - Homing Rocket to (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Custom script: call RemoveLocation(udg_Point_Temp2)
      • -------- ------------------------------ --------
      • Custom script: call DestroyGroup(udg_UGroup_Temp)
      • Custom script: call RemoveLocation(udg_Point_Temp)
      • -------- ------------------------------ --------
      • Unit - Remove ABILITY[2] from Unit_Control[(Player number of (Owner of Unit_Temp))]
      • Unit - Add Ability - Slot to Unit_Control[(Player number of (Owner of Unit_Temp))]
      • -------- ------------------------------ --------
 
Level 10
Joined
Aug 15, 2008
Messages
720
It's TRON map, players got vehicles and trails spawns behind em so you drive and surround enemies until they hit trails and receive massive damage.

There are about.... 60 more triggers. I choose 8k range cause there are Arenas (2 for now) to choose where to play. This ability affects all living players in Arena. Also, there are 7-8 players, so there aren't more than 8 targets. Also fps drops down in levels each time I cast, if it would be eg. 300 units, then I would receive one big lag spike and fps goes back to normal, but this time this is somekind of leak.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
tsss units in 8000 range, that is sure huge, make it playable area instead ... :p

nope maybe it is firebolt, you might change it to stormbolt (if it is the stun you are after)

also you should preload the "add ability and remove ability" actions as they might cause first cast lagg
 
Status
Not open for further replies.
Top