3 ms·
This is really funny; Back in the warcraft 3 days, we used to do the same thing inside its scripting language --- to attach some data to a timer, we would explo
by bollu 6y ago
This is really funny; Back in the warcraft 3 days, we used to do the same thing inside its scripting language --- to attach some data to a timer, we would exploit the fact that a timer is in fact just a 'void *' underneath: so the pointer address gave us the unique ID. We would stash data associated with the timer in a global hash table. Then, in the callback of the timer, we would read the data back from the global hash table!
Your exposition took me a trip down memory lane to middle/high school. Thank you for this :)
- References: https://www.thehelper.net/threads/jass-timers-and-how-to-pass-data-to-them.106986/ https://www.thehelper.net/threads/jass-timers-and-how-to-pas...
- awild 6y agoH2I was such a cool function. I completely forgot how terrible of a language JASS actually was. Have mostly fond memories. But oh my is it verbose