Reply to Re: cutscene with several monsters
If you don't have an account, just leave the password field blank.
When Dink walks on to screen, you should attach something like this to the monster's script:
void main(void)
{
freeze(1);
freeze(¤t_sprite);
say_stop("blah blah",1);
wait(100);
say_stop("`0Blah blah blah!",¤t_sprite (or monster designation);
wait(100);
say_stop("`0More monsters come here!",&monstername);
wait(100);
int &monster1 = create_sprite(xco, yco, brain, seq, frame);
Alright, that's creating a monster without placing it in the editor.
Where xco and yco go, put the X and Y coordinates of where you want monster 1 to be on the screen. Make the brain 9 for now, that's the default monster brain.
Where seq and frame are, put the sequence of the monster you're using, and the frame number of your choice of that sequence. Then, add these two lines:
sp_base_walk(&monster, <basewalk
;
sp_speed(&monster1, 1);
freeze(&monster1);
You can change to the speed to suite how fast your monster goes. Where <basewalk> is, you'll need to put the base_walk sequence for monster1. To find this, go into your sprite selector and find the monster you're using. The walking for monsters has to be a multiple of 10, so find a bonca in your editor. Let's say you find the bonca, and he's in sequence 331 (I don't remember which sequence he's in exactly). If you make the base_walk 331, he won't work. You'll need to make it 330. 331 is 330 + direction. Look at your num pad, the position of the keys on the numpad is the direction your sprite will face (4 being left, 6 being right, etc.). And the freeze(&monster1); will just make sure your sprite doesn't start walking around mid-conversation. It's very rude. So...where was I? Ah yes, screenlocking and targeting. Add this: screenlock(1); after you make the sprite. This will lock the screen. Now, make a new script for the monster, name it something like 'monster'. Add this line after you make monster1:
sp_script(&monster1, "monster");
That will ensure your sprite gets the monster script. For the monster script, you should basically just edit a bonca script, changing stats and the base_attack and such. But we want the new script to make sure when everything is dead, the screen won't be locked anymore. Add these lines into the void die(void) procedure of your enemy script:
if (get_sprite_with_this_brain(9, ¤t_sprite) == 0)
{
//no more brain 9 monsters here, lets unlock the screen
screenlock(0);
playsound(43, 22050,0,0,0);
}
This will check to see if there are any more brain 9 enemies, then unlock the screen if there aren't. As for tracking Dink, just put sp_target(&monster1, 1);
after the conversation is over. If I was to vague on some parts, tell me, and I'll do my best to explain everything better.
void main(void)
{
freeze(1);
freeze(¤t_sprite);
say_stop("blah blah",1);
wait(100);
say_stop("`0Blah blah blah!",¤t_sprite (or monster designation);
wait(100);
say_stop("`0More monsters come here!",&monstername);
wait(100);
int &monster1 = create_sprite(xco, yco, brain, seq, frame);
Alright, that's creating a monster without placing it in the editor.
Where xco and yco go, put the X and Y coordinates of where you want monster 1 to be on the screen. Make the brain 9 for now, that's the default monster brain.
Where seq and frame are, put the sequence of the monster you're using, and the frame number of your choice of that sequence. Then, add these two lines:
sp_base_walk(&monster, <basewalk
sp_speed(&monster1, 1);
freeze(&monster1);
You can change to the speed to suite how fast your monster goes. Where <basewalk> is, you'll need to put the base_walk sequence for monster1. To find this, go into your sprite selector and find the monster you're using. The walking for monsters has to be a multiple of 10, so find a bonca in your editor. Let's say you find the bonca, and he's in sequence 331 (I don't remember which sequence he's in exactly). If you make the base_walk 331, he won't work. You'll need to make it 330. 331 is 330 + direction. Look at your num pad, the position of the keys on the numpad is the direction your sprite will face (4 being left, 6 being right, etc.). And the freeze(&monster1); will just make sure your sprite doesn't start walking around mid-conversation. It's very rude. So...where was I? Ah yes, screenlocking and targeting. Add this: screenlock(1); after you make the sprite. This will lock the screen. Now, make a new script for the monster, name it something like 'monster'. Add this line after you make monster1:
sp_script(&monster1, "monster");
That will ensure your sprite gets the monster script. For the monster script, you should basically just edit a bonca script, changing stats and the base_attack and such. But we want the new script to make sure when everything is dead, the screen won't be locked anymore. Add these lines into the void die(void) procedure of your enemy script:
if (get_sprite_with_this_brain(9, ¤t_sprite) == 0)
{
//no more brain 9 monsters here, lets unlock the screen
screenlock(0);
playsound(43, 22050,0,0,0);
}
This will check to see if there are any more brain 9 enemies, then unlock the screen if there aren't. As for tracking Dink, just put sp_target(&monster1, 1);
after the conversation is over. If I was to vague on some parts, tell me, and I'll do my best to explain everything better.






