• 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] Epic Question Time! Which is better?

Status
Not open for further replies.
Level 16
Joined
Jun 24, 2009
Messages
1,409
What if you made a spell that uses an indexing system and it lasts for e.q. 5 seconds. Which one would you prefer to store a position? The caster unit won't move away.
  1. Store the position at the beginning of the spell and remove it at the end. (Less function calls but an extra variable)
  2. Every 0.03 second store the position to a temporary variable then remove it.(More function calls but no extra variable)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
What if you made a spell that uses an indexing system and it lasts for e.q. 5 seconds. Which one would you prefer to store a position? The caster unit won't move away.
  1. Store the position at the beginning of the spell and remove it at the end. (Less function calls but an extra variable)
  2. Every 0.03 second store the position to a temporary variable then remove it.(More function calls but no extra variable)

1. but i prefer the 2 real variables instead 1 location coz i heard its faster, coz -1 function call (dont need convert coord to point Location(x,y)), index the unit custom value if u cant cast again before effect over

else i think hashtable also good and timerid or something unique the key1, then example could be like this savereal (hashtable, timerid, 1, x),savereal (hashtable, timerid, 2, y)
 
Status
Not open for further replies.
Top