Reply to Re: Two questions
If you don't have an account, just leave the password field blank.
2) is a limitation of about anything: If a script attached to a monster does something, and then you hit it (or talk, touch, die, push, other built-in procs), it plainly forgets what it was supposed to do and continues to do the built-in proc.
Try it with an unfrozen Dink in a lengthy talk()-dialogue, then hit him. He'll stop talking.
The way I see it, set_callback_random(proc, base, range) is equivalent to:
int &rndtime = random(base, range);
wait(&rndtime);
proc();
So if you had it waiting before it runs proc(), and then hit it, the script forgets that it was waiting and runs the hit() thing.
It's also the reason why sp_touch_damage(¤t_sprite,0); should be in the first line of a touch-proc: It detects that Dink touches it and forgets doing whatever it was doing in the touch-proc, and then runs the touch-proc.
Try it with an unfrozen Dink in a lengthy talk()-dialogue, then hit him. He'll stop talking.
The way I see it, set_callback_random(proc, base, range) is equivalent to:
int &rndtime = random(base, range);
wait(&rndtime);
proc();
So if you had it waiting before it runs proc(), and then hit it, the script forgets that it was waiting and runs the hit() thing.
It's also the reason why sp_touch_damage(¤t_sprite,0); should be in the first line of a touch-proc: It detects that Dink touches it and forgets doing whatever it was doing in the touch-proc, and then runs the touch-proc.







