The Dink Network

Reply to Re: cutscene with several monsters

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 11th 2009, 08:42 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Yeah, but for the stuff that will vary depending on your D-Mod, I'll put in some random numbers/letters (things like the coordinates for monsters).

Step 1: Save this as a script called "monster" (without quotations) and attach it to a grey bonca or some other monster. Make sure you give the bonca/boss a base_attack, base_walk, speed, all that good stuff via WinDinkEdit + or something. It's not necessary to include the simple stuff like attack and walking through scripts with editor placed sprites.

void main(void)
{
screenlock(1);
freeze(1);
freeze(&current_sprite);
say_stop("blah blah",1);
wait(100);
say_stop("`0Blah blah blah!",&current_sprite); designation);
wait(100);
say_stop("`0More monsters come here!",&current_sprite);
wait(100);

int &monster1 = create_sprite(100, 200, 9, 613, 1);
sp_base_walk(&monster1, 610);
sp_speed(&monster1, 1);
script(&monster1, "monster");
freeze(&monster1);

int &monster2 = create_sprite(150, 250, 9, 611, 1);
sp_base_walk(&monster2, 610);
sp_speed(&monster2, 1);
script(&monster2, "monster");
freeze(&monster2);

say_stop("`0MWAHAHAHAHA!",&current_sprite);

unfreeze(&current_sprite);
unfreeze(&monster1);
unfreeze(&monster2);
unfreeze(1);

sp_target(&current_sprite, 1);
sp_target(&monster1, 1);
sp_target(&monster2, 1);

say("Uh-oh!",1);
}

void die( void )
{

if (get_sprite_with_this_brain(9, &current_sprite) == 0)
{
//no more brain 9 monsters here, lets unlock the screen

screenlock(0);
playsound(43, 22050,0,0,0);

}

int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","medium");
}

Step 2: Make a new script called "monster" (without quotations), and put this in that script:

void main(void)
{
//can't get out of screen until this dude is DEAD
screenlock(1);
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_nohit(&current_sprite, 0);
sp_distance(&current_sprite, 50);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 40);
sp_base_walk(&current_sprite, 610);
sp_base_death(&current_sprite, 550);
sp_base_attack(&current_sprite, 620);
sp_defense(&current_sprite, 3);
sp_strength(&current_sprite, 8);
sp_touch_damage(&current_sprite, 5);
sp_hitpoints(&current_sprite, 20);

}

void hit( void )
{
playsound(29, 22050,0,&current_sprite, 0);

sp_target(&current_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound

}

void die( void )
{

if (get_sprite_with_this_brain(9, &current_sprite) == 0)
{
//no more brain 9 monsters here, lets unlock the screen

screenlock(0);
playsound(43, 22050,0,0,0);

}

int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","medium");
}

void attack( void )
{
playsound(31, 22050,0,&current_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
}

That's it. If it still doesn't work, tell me. I may have forgot something...or something.