Reply to Re: DinkC Reference Guide Now Available
If you don't have an account, just leave the password field blank.
Actually yeh, I just tested it always returns the current game tick regardless of the attack_wait setting on the sprite. Interestingly, when you do sp_attack_wait(¤t_sprite, -1) it causes the sprite to ignore whatever it's current attack_wait setting is and attempt to attack immediately. lol.
But yeh, I think getting the game tick with attack_wait is under-used in dmods. I don't think there's many dmods at all that make use of it. Example uses; in Charlie, I used it for barfight cooldowns, if you started a fight in any of the bars the game tick time would be retrieved at that time, and the NPC would refuse to talk to you for 5 real minutes, saving a game would store the current elapsed time of any timers in the dmod, so that on load it could start the timer again based on the new current game tick so the 5 minutes was honored on save/load.
Same concept used to remember the amount of shield-buff time remaining on save/load, rather than cancel it or get the full buff time again each time.
I'll update it in the next DinkC ref update, with an example code snippet of use. I'll wait for the new YeDink version, so I can just update it all at once.
But yeh, I think getting the game tick with attack_wait is under-used in dmods. I don't think there's many dmods at all that make use of it. Example uses; in Charlie, I used it for barfight cooldowns, if you started a fight in any of the bars the game tick time would be retrieved at that time, and the NPC would refuse to talk to you for 5 real minutes, saving a game would store the current elapsed time of any timers in the dmod, so that on load it could start the timer again based on the new current game tick so the 5 minutes was honored on save/load.
Same concept used to remember the amount of shield-buff time remaining on save/load, rather than cancel it or get the full buff time again each time.
I'll update it in the next DinkC ref update, with an example code snippet of use. I'll wait for the new YeDink version, so I can just update it all at once.






