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

Any leaks @Abilities?

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Hello, I have 3 abilities so far in this map of mine Heatseeker, Sentry Gun, and Tazer. I would like to ask of you to check these for any leaks or bugs and add suggestions if wanted. Thanks!
 

Attachments

  • Arena Idea 0001.w3x
    109.9 KB · Views: 44
Level 6
Joined
Oct 4, 2011
Messages
226
I cant seem to find where the location leak is on sentry gun, I did find the mistake on the heatseeker location 1 on the 2.00 second trigger. If you could show me how to fix sentry gun that would be lovely.

Also my tazer ability is deffective.
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,243
Spell 1:
set point1 = target point of ability being cast
create effect at point1
remove point1

Spell 2:
set point1 = position of target unit of abilit being cast
move caster instantly to point1
remove point1

I cases like this it is definitely recommendable to use the same variable.

In my opinion "temp" global variables hould be shared between abilities as much as possible.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
You shouldn't be using locations in the 1st place tho... Coordinates operate way faster.

That kind off answers itself.

Edit:

Since it's a gui issue, you should probably not use same variables ever. Makes it impossible for overlaps and having distinctivelly named variables makes it easier when copying into a different map (no likelly interference)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Yeah, GUI...having scopeless variables since you cannot even pick a proper name due to the max length. I persist that GUI users trying to avoid memory leaks is funny. Should only do so in very frequent triggers where it forms a real problem. You would normally declare local variables for such a scenario but locations are not even needed. Temp global variables only in the meaning of "I dispose of it right again without waits/timers or actions which could run events".

edit:

  • Set TZ01_TargetPoint = (Position of TZ01_TargetUnit)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • 'IF'-Bedingungen
      • (TZ01_TargetUnit is alive) Gleich True
    • 'THEN'-Aktionen
      • Einheit - Create 1 2.05 second stun for SG01_OwnerPlayer at TZ01_TargetPoint facing TZ01_TargetPoint
      • Einheit - Order (Last created unit) to Angreifen TZ01_TargetUnit
      • Einheit - Add a 1.00 second Standard expiration timer to (Last created unit)
    • 'ELSE'-Aktionen
  • Custom script: call RemoveLocation(udg_TZ01_TargetPoint)

Here it would not be good for example because the order action could run an event.
 
Status
Not open for further replies.
Top