Reply to Re: sp_kill_wait() - broken?
If you don't have an account, just leave the password field blank.
The DinkC reference states "The wait time is the internal counter that determines when the next frame of animation will be displayed" which is flat-out wrong, as the time when the next frame appears is of course determined by the "frame delay" parameter.
Instead, it relates to the "timing" value, which the reference states is the interval when the brain functions will next be called. This is set to a random value for ducks and pigs to make them idle a bit after they've been walking.
The easiest way to see what "timing" does is to set it to something large like 5000 or more on a brain 6 sprite, which will then wait at the end of its sequence for 5 seconds before restarting. If you were to set the wait timer to zero during this interval with kill_wait, it would start animating again, overriding the timing value.
thenewguy writes about it here, and says it doesn't do anything, which is true, as by default the player sprite has no timing value set. I can't think of any reason why it was used in the original scripts at all. The best attempt at an explanation is in BigTed's annotated dinkc.txt:
[This explanation is pure nonsense to me. I have no idea what it means or
what this function does. Nor does looking for example uses of this command
help. The only example I can find is this line in every weapon's item-xxx
script: sp_kill_wait(1); //make sure dink will punch right away
If this command were not there, under what circumstance might Dink not "punch
right away?" If anyone knows, I'm listening.
Instead, it relates to the "timing" value, which the reference states is the interval when the brain functions will next be called. This is set to a random value for ducks and pigs to make them idle a bit after they've been walking.
The easiest way to see what "timing" does is to set it to something large like 5000 or more on a brain 6 sprite, which will then wait at the end of its sequence for 5 seconds before restarting. If you were to set the wait timer to zero during this interval with kill_wait, it would start animating again, overriding the timing value.
thenewguy writes about it here, and says it doesn't do anything, which is true, as by default the player sprite has no timing value set. I can't think of any reason why it was used in the original scripts at all. The best attempt at an explanation is in BigTed's annotated dinkc.txt:
[This explanation is pure nonsense to me. I have no idea what it means or
what this function does. Nor does looking for example uses of this command
help. The only example I can find is this line in every weapon's item-xxx
script: sp_kill_wait(1); //make sure dink will punch right away
If this command were not there, under what circumstance might Dink not "punch
right away?" If anyone knows, I'm listening.