Reply to Re: Custom procedures
If you don't have an account, just leave the password field blank.
I'm not convinced that set_callback_random actually calls itself infinitely until the script that has it is killed.
I've been testing a callback function that checks if an enemy sprite is trapped in the bottom right hand corner, and if so, break out of that with a move in direction 7 to x co-ord 300. This works if I have a callback command at the end of the custom command, and was something I remember Paul Pliska did for his enemy sprite script that could fire off magic missiles at Dink which I used for my enemy at the end of story 2 of SOB
That's the code from Paul and his comments
I've been testing a callback function that checks if an enemy sprite is trapped in the bottom right hand corner, and if so, break out of that with a move in direction 7 to x co-ord 300. This works if I have a callback command at the end of the custom command, and was something I remember Paul Pliska did for his enemy sprite script that could fire off magic missiles at Dink which I used for my enemy at the end of story 2 of SOB
//It seems that I have to re-set the callbacks //evrytime it is hit or attacks or shoots. // ************ CALL BACKS ************* &cbsnd = set_callback_random( "sound",1000,8500); //for Lich sound. &cbfire = set_callback_random( "fb",500,4500); //for FIREBALL &mcounter = random(6000,2000); sp_attack_wait(¤t_sprite, &mcounter); }
That's the code from Paul and his comments