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

Same or Separate Variables for Map Triggered Abilities?

Status
Not open for further replies.
Level 9
Joined
Jul 10, 2011
Messages
562
depends :D

if its an istant ability i use TempVARS because spell specific VARS are not needed.... if it not i use spell specific VARS.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Only if it isn't instant (like uses loops or waits or is split on 2 or more triggers)
Otherwise use TempAbility, TempUnit, TempPoint etc. etc.

Edit// claptomanic was faster :) And its not only for defense maps but overal.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The correct programming approach is to use locals with names appropiate to their function. As JASS is useless junk though...

I recall that it was discovered that globals were faster than locals. This means that in theory it would be best if a precompiler were to automaticly replace local variables with "shared" or "static" globals where appropiate.
 
Status
Not open for further replies.
Top