• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] LEAKS! aint it wonderfull?

Status
Not open for further replies.
Level 7
Joined
Mar 13, 2008
Messages
228
so, I'm having a problem removing these leaks, I cant find any place to get a good knowlegde of how to remove ARRAY leaks and all I do is reported as a leak!!! How to fix?

  • Airstrike
    • Events
      • blablabla
    • Conditions
      • blablabla
    • Actions
      • Set AirstrikePoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
      • Wait 1.00 seconds
      • Set AirstrikTargets[(Player number of (Owner of (Triggering unit)))] = (Units within 400.00 of AirstrikePoint[(Player number of (Owner of (Triggering unit)))])
      • Unit Group - Pick every unit in AirstrikTargets[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
 
Level 7
Joined
Mar 13, 2008
Messages
228
I have tried that but since so many people say it I going to tell Leack Check to go fuck itself for telling its a leak, and start using it.

Edit: New problem!!! Now testing and the map wont work! and errors are displayed when saving and testing!!!!! help
 
Level 8
Joined
Aug 4, 2008
Messages
279
Well, for array boths arrays, u can do:
Custom Script : call RemoveLocation (udg_AirStrikPoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit))])
and call DestroyGroup (udg_AirstrikTargets(=[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit))])
 
Level 7
Joined
Mar 13, 2008
Messages
228
OK new problem, why wont this unit return to 0 unit height??? it goes up but not down!!!


  • Airstrike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Airstrike
    • Actions
      • Set AirstrikePoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
      • Set AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] = (Units within 400.00 of AirstrikePoint[(Player number of (Owner of (Triggering unit)))])
      • Unit Group - Pick every unit in AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Unit - Add Crow Form to (Picked unit)
          • Unit - Remove Crow Form from (Picked unit)
          • Animation - Change (Picked unit) flying height to 200.00 at 500.00
          • Wait 0.30 seconds
          • Animation - Change (Picked unit) flying height to 0.00 at 1000.00
      • Custom script: call RemoveLocation(udg_AirstrikePoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call DestroyGroup(udg_AirstrikeTargets[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
 
Level 6
Joined
Mar 27, 2009
Messages
195
OK new problem, why wont this unit return to 0 unit height??? it goes up but not down!!!

  • Airstrike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Airstrike
    • Actions
      • Set AirstrikePoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
      • Set AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] = (Units within 400.00 of AirstrikePoint[(Player number of (Owner of (Triggering unit)))])
      • Unit Group - Pick every unit in AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Unit - Add Crow Form to (Picked unit)
          • Unit - Remove Crow Form from (Picked unit)
          • Animation - Change (Picked unit) flying height to 200.00 at 500.00
          • Wait 0.30 seconds
          • Animation - Change (Picked unit) flying height to 0.00 at 1000.00
      • Custom script: call RemoveLocation(udg_AirstrikePoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call DestroyGroup(udg_AirstrikeTargets[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])

that won't work cause the "picked unit" thing gets deleted after the wait. try to use a variable instead, e.g.:

  • Airstrike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Airstrike
    • Actions
      • Set AirstrikePoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
      • Set AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] = (Units within 400.00 of AirstrikePoint[(Player number of (Owner of (Triggering unit)))])
      • Unit Group - Pick every unit in AirstrikeTargets[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Set YourPickedUnit = (Picked Unit)
          • Unit - Add Crow Form to (YourPickedUnit)
          • Unit - Remove Crow Form from (YourPickedUnit)
          • Animation - Change (YourPickedUnit) flying height to 200.00 at 500.00
          • Wait 0.30 seconds
          • Animation - Change (YourPickedUnit) flying height to 0.00 at 1000.00
      • Custom script: call RemoveLocation(udg_AirstrikePoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call DestroyGroup(udg_AirstrikeTargets[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
 
Status
Not open for further replies.
Top