| 06-17-2005, 05:54 PM | #1 |
i know that local vars can only be used in the trigger you create them in and global in every trigger. but does that mean global variables take up more memory? but im not saying a big enough difference to notice with just 1 variable, i mean like maybe 100 variables or more. |
| 06-17-2005, 08:10 PM | #2 |
yes, they take up more memory, but for all i know it isnt really to be noticed, not even at 100-500 variables however you should use locals whenever you can, just to keep the map clean and easily overlooked. |
| 06-17-2005, 09:14 PM | #3 |
What? They take equal amounts of memory. The thing is the local is temporary, for a short while it uses that memory, while the global is permanant it always takes the same amount of memory. locals are generally for conveince, and a tenent of object oriented programming is to never use globals. Most people who learn programming are tought OOP and as a result are more comfortable in never using globals. (ME) |
| 06-17-2005, 09:15 PM | #4 |
well, yes, that is what I ment.. I guess I formulated it wrong. I ment: if you use globals instead of locals you will use more memory (cuz the locals are temporary) |
| 06-20-2005, 11:25 AM | #5 |
Guest | Yap... and if you use globals for spells, it won't multi-instanceable (meaning it can't be cast by two different people at the same time). |
