• 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.

Leak or not?

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
hey, simple question, do i need to create a second point variable for editing an offset?
  • Set Respawn_Point = (Position of (Triggering unit))
  • Held - Instantly revive (Triggering unit) at (Respawn_Location offset by 256.00 towards 0.00 degrees), Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
hey, simple question, do i need to create a second point variable for editing an offset?
  • Set Respawn_Point = (Position of (Triggering unit))
  • Held - Instantly revive (Triggering unit) at (Respawn_Location offset by 256.00 towards 0.00 degrees), Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)

Yes, create a second one.
 
Level 5
Joined
Jan 12, 2010
Messages
132
hey, simple question, do i need to create a second point variable for editing an offset?
  • Set Respawn_Point = (Position of (Triggering unit))
  • Held - Instantly revive (Triggering unit) at (Respawn_Location offset by 256.00 towards 0.00 degrees), Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)

True form:
  • Set Respawn_Point = (Position of (Triggering unit))
  • Set Respawn_Point2 = (Respawn_Location offset by 256.00 towards 0.00 degrees)
  • Held - Instantly revive (Triggering unit) at Respawn_Point2 , Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)
  • Custom script: call RemoveLocation (udg_Respawn_Point2)
 
Level 14
Joined
Dec 29, 2009
Messages
931
True form:
  • Set Respawn_Point = (Position of (Triggering unit))
  • Set Respawn_Point2 = (Respawn_Location offset by 256.00 towards 0.00 degrees)
  • Held - Instantly revive (Triggering unit) at Respawn_Point2 , Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)
  • Custom script: call RemoveLocation (udg_Respawn_Point2)

Position of Triggering Unit isn't used..?

I clearly didn't read this right..
Use this method to ensure the leaks are removed.

Keep in mind, if you want to keep the respawn location the same,
DO NOT remove the location.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
hey, simple question, do i need to create a second point variable for editing an offset?
  • Set Respawn_Point = (Position of (Triggering unit))
  • Held - Instantly revive (Triggering unit) at (Respawn_Location offset by 256.00 towards 0.00 degrees), Zeigen revival graphics
  • Custom script: call RemoveLocation (udg_Respawn_Point)

this dont leak that sure :D

  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set U = (Triggering unit)
      • Custom script: call ReviveHero(udg_U, GetUnitX(udg_U) + 256.00 * Cos(0 * bj_DEGTORAD), GetUnitY(udg_U) + 256.00 * Sin(0 * bj_DEGTORAD), true)
x = original hero x coordinate
y = original hero x coordinate
newX = x + distance * Cos(angle * bj_DEGTORAD)
newY = y + distance * Sin(angle * bj_DEGTORAD)
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
if he is working with GUI he can just use point offset, if he was to use this, why even calling those?
in Jass you can optimize a lot more then in GUI

and why would you want to compare it with GUI?

every deent system what use gui, also use custom script, correct me if wrong but custom script is needed for clean the leaks, what i posted that also a way, u can use gui just with custom script and without location and without another 2 leak cleaning custom script, and maybe someone dont know how its work when u use coordinates and not location for pollaroffset things
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
to be honest if I didnt inow what polar projection is I would most likely have no idea what the Cos, Sin does there

this doesnt change anything on the fact that Sin and Cos are usless here because he does it towards 0 degrees

anyways ultimate11 already post a good enough solution
 
Status
Not open for further replies.
Top