Reply to Re: Help Needed With D-MOd!!!
If you don't have an account, just leave the password field blank.
Hang on, this would be easier.
You'd just need to have a second version of this script without the speech part in there if you wanted to use this to screenlock any other pillbug screens.
void main(void)
{
//lock the screen straight up when the player enters
screenlock(1);
//set the brain and speed of the pillbug
sp_brain(¤t_sprite, 9);
sp_speed(¤t_sprite, 1);
//set the exp the player will receive when they kill it
sp_exp(¤t_sprite, 5);
//set the base walk and base death
sp_base_walk(¤t_sprite, 130);
sp_base_death(¤t_sprite, 140);
//set the touch damage of the pillbug
sp_touch_damage(¤t_sprite, 1);
//set the hitpoints of the pillbug
sp_hitpoints(¤t_sprite, 8);
//preload the pillbugs graphics
preload_seq(131);
preload_seq(133);
preload_seq(141);
preload_seq(143);
//give a random chance of the pillbug locking onto the player straight up
if (random(2,1) == 1)
{
sp_target(¤t_sprite, 1);
}
}
void hit(void)
{
//This is the hit sequence, it is run when something hits me
//Lock onto the dink that just hit the pillbug
sp_target(¤t_sprite, &enemy_sprite);
//and play the pillbug sound
playsound(30, 21050, 4000, ¤t_sprite, 0);
}
void die(void)
{
//This is the die procedure, it is run when I die
//let's check if there is any other brain 9 monsters left on the screen
if (get_sprite_with_this_brain(9, ¤t_sprite) == 0)
{
//there isn't, so let's unlock the screen
screenlock(0);
//and play the unlock screen sound
playsound(43, 22050,0,0,0);
//Now if you want Dink to say something when the screen is unlocked, add it here
freeze(1);
say_stop("MAKE ME SAY SOMETHING!!", 1);
unfreeze(1);
}
//This make me appear back after 5 minutes, yay
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
//this will randomly choose a small reward to appear, like a small heart
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
external("emake","small");
}
You'd just need to have a second version of this script without the speech part in there if you wanted to use this to screenlock any other pillbug screens.







