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

Will this result into a leak!?

Status
Not open for further replies.
Level 4
Joined
Mar 5, 2006
Messages
46
Set TempPoint = Position of Casting unit offset by 500 toward Facing of Casting unit
Code:
[CODE]
call RemoveLocation(udg_TempPoint)

-------------------------

Because i think i need to make another TempPoint variable so that:

Set TempPoint2 = TempPoint offset by 500 towards Facing of Casting unit
[CODE]
[CODE]
call RemoveLocation(udg_TempPoint2)
call RemoveLocation(udg_TempPoint)
 
Level 16
Joined
Oct 12, 2008
Messages
1,570

Please do not double post within the bump-time stated in the site rules!, use the EDIT button underneath your post instead


  • Set TempPoint1 = (Position of (Triggering Unit)) offset by 500 towards (Facing of (Triggering Unit))
  • --------------------- Code
  • Custom script: call RemoveLocation(udg_TempPoint1)
leaks. the (Position of (Triggering Unit)) is the leak. Doing it the second way is right:
  • Set TempPoint1 = (Position of (Triggering Unit))
  • Set TempPoint2 = TempPoint1 offset by 500 towards (Facing of (Triggering Unit))
  • ---------------- Code
  • Custom script: call RemoveLocation(udg_TempPoint1)
  • Custom script: call RemoveLocation(udg_TempPoint2)
that is leakless..

About your second question:
  • Custom script: call RemoveLocation(udg_TempArrayPoint[1])
removes TempArrayPoint[1]
  • Custom script: call RemoveLocation(udg_TempArrayPoint[udg_TempInteger])
removes TempArrayPoint[TempInteger] ----------- note the 'udg_' prefix is also in front of TempInteger!!
  • Custom script: call RemoveLocation(udg_TempArrayPoint[bj_forLoopAIndex])
removes TempArrayPoint[(Integer A)]
If you want to remove an (Integer B) array, just replace the A in the last script by a B and you are done.
 
Status
Not open for further replies.
Top