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

leaks?! help!!

Status
Not open for further replies.
Level 5
Joined
Dec 22, 2008
Messages
52
Hi :wink:
I'm not often write in forum but my map laggs a bit and i think it is somthing that calls "Leaks"... i am not very good at this so i maby thought sombady could help me :grin:
I will try to learn about the leaks... sooner....
+Rep to the helper....

So is this trigger leaks?! i have try "leak cheacker" and it dosent find anything...
  • Start
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shot
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AR_Arrowsss Less than 28
        • Then - Actions
          • Set AR_Arrowsss = (AR_Arrowsss + 1)
        • Else - Actions
          • Set AR_Arrowsss = 1
      • Set AR_speed = 8.00
      • Set AR_Caster[AR_Arrowsss] = (Casting unit)
      • Set AR_Point[AR_Arrowsss] = (Target point of ability being cast)
      • Set AR_Point_Caster[AR_Arrowsss] = (Position of AR_Caster[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Wait 0.20 seconds
      • Unit - Create 1 Magic Ball for (Owner of AR_Caster[AR_Arrowsss]) at (AR_Point_Caster[AR_Arrowsss] offset by 40.00 towards AR_Angel[AR_Arrowsss] degrees) facing AR_Angel[AR_Arrowsss] degrees
      • Set AR_Arrow[AR_Arrowsss] = (Last created unit)
      • Wait 1.00 seconds
      • Unit - Remove AR_Arrow[AR_Arrowsss] from the game
And this
  • Move
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Set AR_Point_Arrow[(Integer A)] = ((Position of AR_Arrow[(Integer A)]) offset by AR_speed towards AR_Angel[(Integer A)] degrees)
          • Unit - Move AR_Arrow[(Integer A)] instantly to AR_Point_Arrow[(Integer A)]
:vw_wtf::vw_wtf::vw_wtf:
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Yeah it leaks, second the trigger shouldn't run at 0.01, 0.03 is fine.

First leak

  • Create 1 Magic Ball for (Owner of AR_Caster[AR_Arrowsss]) at (AR_Point_Caster[AR_Arrowsss] offset by 40.00 towards AR_Angel[AR_Arrowsss] degrees)
Second leak


Set AR_Point_Arrow[(Integer A)] = ((Position of AR_Arrow[(Integer A)]) offset by AR_speed towards AR_Angel[(Integer A)] degrees)

and also you don't remove the locations.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Set AR_Point[AR_Arrowsss] = (Target point of ability being cast)
  • Set AR_Point_Caster[AR_Arrowsss] = (Position of AR_Caster[AR_Arrowsss])
  • Wait 0.20 seconds
  • Unit - Create 1 Magic Ball for (Owner of AR_Caster[AR_Arrowsss]) at (AR_Point_Caster[AR_Arrowsss] offset by 40.00 towards AR_Angel[AR_Arrowsss] degrees) facing AR_Angel[AR_Arrowsss] degrees
  • Wait 1.00 seconds
  • Custom script: call RemoveLocation(udg_AR_Point[udg_AR_Arrowsss]
  • Custom script: call RemoveLocation(udg_AR_Point_Caster[udg_AR_Arrowsss]
^Point with offset leaks too.

Do like this:
  • Set point1 = Position of...
  • Set point2 = point1 offset by...
  • Create unit at point2

  • Move
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Set AR_Point_Arrow[(Integer A)] = ((Position of AR_Arrow[(Integer A)]) offset by AR_speed towards AR_Angel[(Integer A)] degrees)
          • Unit - Move AR_Arrow[(Integer A)] instantly to AR_Point_Arrow[(Integer A)]
^The offset point must be set to a variable too, and clear the leaks using custom scripts.
 
Level 5
Joined
Dec 22, 2008
Messages
52
Ok I dont understand the last trigger leak... and i don't know if i have fix the other leak?!
but is this correct?!
  • Start
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shot
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AR_Arrowsss Less than 28
        • Then - Actions
          • Set AR_Arrowsss = (AR_Arrowsss + 1)
        • Else - Actions
          • Set AR_Arrowsss = 1
      • Set AR_speed = 24.00
      • Set AR_Caster[AR_Arrowsss] = (Casting unit)
      • Set AR_Point[AR_Arrowsss] = (Target point of ability being cast)
      • Set AR_Point_Caster[AR_Arrowsss] = (Position of AR_Caster[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Set AR_Spawn[AR_Arrowsss] = (AR_Point_Caster[AR_Arrowsss] offset by 40.00 towards AR_Angel[AR_Arrowsss] degrees)
      • Wait 0.20 seconds
      • Unit - Create 1 Magic Ball for (Owner of AR_Caster[AR_Arrowsss]) at AR_Spawn[AR_Arrowsss] facing AR_Angel[AR_Arrowsss] degrees
      • Set AR_Arrow[AR_Arrowsss] = (Last created unit)
      • Wait 1.00 seconds
      • Unit - Remove AR_Arrow[AR_Arrowsss] from the game
      • Custom script: call RemoveLocation(udg_AR_Point[udg_AR_Arrowsss])
      • Custom script: call RemoveLocation(udg_AR_Point_Caster[udg_AR_Arrowsss])
And i don't get this one?! what is leaking?!?!
  • Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Set AR_Point_Arrow[(Integer A)] = ((Position of AR_Arrow[(Integer A)]) offset by AR_speed towards AR_Angel[(Integer A)] degrees)
          • Unit - Move AR_Arrow[(Integer A)] instantly to AR_Point_Arrow[(Integer A)]
 
Level 5
Joined
Dec 22, 2008
Messages
52
What is the custom script to remove this points?!
  • Set AR_Arrow_Point[(Integer A)] = (Position of AR_Arrow[(Integer A)])
AR_Arrow_Point[(Integer A)]

and
  • Set AR_Point_Arrow[(Integer A)] = (AR_Arrow_Point[(Integer A)] offset by AR_speed towards AR_Angel[(Integer A)] degrees)
AR_Point_Arrow[(Integer A)]
 
Level 5
Joined
Dec 22, 2008
Messages
52
Finish!
Here is the finish triggers... Hope it is correct....
  • Start
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shot
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AR_Arrowsss Less than 28
        • Then - Actions
          • Set AR_Arrowsss = (AR_Arrowsss + 1)
        • Else - Actions
          • Set AR_Arrowsss = 1
      • Set AR_speed = 24.00
      • Set AR_Caster[AR_Arrowsss] = (Casting unit)
      • Set AR_Point[AR_Arrowsss] = (Target point of ability being cast)
      • Set AR_Point_Caster[AR_Arrowsss] = (Position of AR_Caster[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Set AR_Angel[AR_Arrowsss] = (Angle from AR_Point_Caster[AR_Arrowsss] to AR_Point[AR_Arrowsss])
      • Set AR_Spawn[AR_Arrowsss] = (AR_Point_Caster[AR_Arrowsss] offset by 40.00 towards AR_Angel[AR_Arrowsss] degrees)
      • Wait 0.20 seconds
      • Unit - Create 1 Magic Ball for (Owner of AR_Caster[AR_Arrowsss]) at AR_Spawn[AR_Arrowsss] facing AR_Angel[AR_Arrowsss] degrees
      • Set AR_Arrow[AR_Arrowsss] = (Last created unit)
      • Wait 1.00 seconds
      • Unit - Remove AR_Arrow[AR_Arrowsss] from the game
      • Custom script: call RemoveLocation(udg_AR_Point[udg_AR_Arrowsss])
      • Custom script: call RemoveLocation(udg_AR_Point_Caster[udg_AR_Arrowsss])
      • Custom script: call RemoveLocation(udg_AR_Spawn[udg_AR_Arrowsss])
And
  • Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Set AR_Arrow_Point[(Integer A)] = (Position of AR_Arrow[(Integer A)])
          • Set AR_Point_Arrow[(Integer A)] = (AR_Arrow_Point[(Integer A)] offset by AR_speed towards AR_Angel[(Integer A)] degrees)
          • Unit - Move AR_Arrow[(Integer A)] instantly to AR_Point_Arrow[(Integer A)]
          • Custom script: call RemoveLocation(udg_AR_Arrow_Point[bj_forLoopAIndex])
          • Custom script: call RemoveLocation(udg_AR_Point_Arrow[bj_forLoopAIndex])
:ogre_haosis::ogre_haosis::ogre_haosis:
 
Status
Not open for further replies.
Top