• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to fix these leaks

Status
Not open for further replies.

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
I think I removed all the leaks here that I know of, but how do I remove location leaks? Must I remove the leaks created each time I instantly move a unit?

  • Airborne
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JumpLength Greater than 0.00
        • Then - Actions
          • Set JumpLength = (JumpLength - 12.00)
          • Set Distance = (Distance - 12.00)
          • Set Airheight = (Airheight + (6.00 + (0.07 x JumpLength)))
          • Special Effect - Create a special effect attached to the chest of Jetpack using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move Jetpack instantly to ((Position of Jetpack) offset by 12.00 towards Angle degrees)
          • Animation - Change Jetpack flying height to Airheight at 3000.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • JumpLength Less than or equal to 0.00
              • Distance Greater than 0.00
        • Then - Actions
          • Set JumpLength = (JumpLength - 12.00)
          • Set Distance = (Distance - 12.00)
          • Set Airheight = (Airheight + (-6.00 + (0.07 x JumpLength)))
          • Special Effect - Create a special effect attached to the chest of Jetpack using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move Jetpack instantly to ((Position of Jetpack) offset by 12.00 towards Angle degrees)
          • Animation - Change Jetpack flying height to Airheight at 3000.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Airheight Less than or equal to 1.00
            • Then - Actions
              • Animation - Change Jetpack flying height to 0.00 at 3000.00
              • Unit - Move Jetpack instantly to LandingSpot
              • Set Airheight = 0.00
              • Set JumpLength = 0.00
              • Set Distance = 0.00
              • Set Angle = 0.00
              • Unit - Turn collision for Jetpack On
              • Trigger - Turn off (This trigger)
              • Unit - Create 1 Dummy for (Owner of Jetpack) at (Position of Jetpack) facing Default building facing degrees
              • Unit - Add Landing Damage to (Last created unit)
              • Unit - Set level of Landing Damage for (Last created unit) to (Level of Jump (Hunter) for Jetpack)
              • Custom script: call IssueImmediateOrder( GetLastCreatedUnit(), "stomp" )
              • Special Effect - Create a special effect at LandingSpot using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set Jetpack = No unit
              • Custom script: call RemoveLocation( udg_LandingSpot )
              • Unit - Remove (Last created unit) from the game
            • Else - Actions
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
ty ghostwolf

  • Set PositionTemp = (Position of (Triggering unit))
  • Set TargetPointTemp = (PositionTemp offset by 12.00 towards Angle degrees)
  • Unit - Move JetPack instantly to TargetPointTemp
  • Custom script: Custom script: call RemoveLocation( udg_PositionTemp )
  • Custom script: Custom script: call RemoveLocation( udg_TargetPointTemp )

Well to fix this problem with the unit, I remove both the location and target position being moved to. I think this is correct, but I cannot see other location leaks than this in my main trigger....
 
Level 11
Joined
Aug 25, 2006
Messages
971
@TKF Whats the point of creating a special effect if you destroy it in the next line?!

@valkemiere what are you talking about? Try to be more specific in your posts. In (at least several) of your posts I've seen you give short, partially unreadable answers. Its nice that you want to help, but please: Capitalize sentences, use punctuation, and be descriptive. (If English is not your native language I guess you have an excuse)
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
  • Set PositionTemp = (Position of (Triggering unit))
  • Set TargetPointTemp = (PositionTemp offset by 12.00 towards Angle degrees)
  • Unit - Move JetPack instantly to TargetPointTemp
  • Custom script: Custom script: call RemoveLocation( udg_PositionTemp )
  • Custom script: Custom script: call RemoveLocation( udg_TargetPointTemp )

This did fuck up the jump, so does anyone knows a different leak cleaning solutiuon which makes it work the same as my first trigger without leaks?


@valkemiere: btw do you suggest that I change my periotic time? is it to fast with 0.01? I can easily change it to 0.02.


@wd40bomber7: I remove the leaks of special effects. They do come every time.
 
Level 11
Joined
Aug 25, 2006
Messages
971
Omg. FOR THE LAST TIME (I've said this in at least a dozen other threads)
You can't have a wait less then (approx) .1 in single player. In multiplayer you can't have a wait less then (approx) .3

So if you set it to .03 or .01 or .0259235873 It will STILL be around .29 (in multi) or .1 (in single)

If you want to wait such little amounts of time, use a timer!

Setting everything to variables is a waste of computer power. Only set objects which must be destroyed to variables!

Also, if you want I'll help you clean your trigger. However I want you to post the map so I can work with the trigger itself. (I don't feel like spending an hour recreating your trigger...)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
First removing a special effect after it was created DOESN'T remove the "shown" effect, so it has no problem in it.

And then again, a event - every x = TIMER and not a WAIT (for a hint, look at the category of it - Time) so it works perfectly with whatever time you put in it.

I suggest you to use ~0.05 for less lag issues.

No there isn't any other way to remove leaks.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
I rather don't want to use 0.05, it will be to slow here. Maybe I reduce it to 0.02, cuz it must look like a jump flight, not like a lagging jump. This jump causes a sharp increase in height and sharp downfall.


btw I cannot remove the location leaks without screwing the trigger, I don't know how. Without removing them, it still makes noticeable leaks. :wconfused:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Airborne
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JumpLength Greater than 0.00
        • Then - Actions
          • Set JumpLength = (JumpLength - 12.00)
          • Set Distance = (Distance - 12.00)
          • Set Airheight = (Airheight + (6.00 + (0.07 x JumpLength)))
          • Special Effect - Create a special effect attached to the chest of Jetpack using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set Point[0] = (Position of (Jetpack))
          • Set Point[1] = Point[0] offset by 12.00 towards Angle degrees)
          • Unit - Move Jetpack instantly to Point[1]
          • Animation - Change Jetpack flying height to Airheight at 3000.00
          • Custom script: call RemoveLocation(udg_Point[0]
          • Custom script: call RemoveLocation(udg_Point[1]
        • Else - Actions
Whats the problem with this ?


Whops sorry for double post, didn't notice im not editing x.x
 
Level 11
Joined
Aug 25, 2006
Messages
971
No not what he meant.
He means why Custom Script: Custom Script:
See theres two of them on one line. In the next line theres another two. Thats what hes trying to say. (I think)
 
Status
Not open for further replies.
Top