The Dink Network

Reply to Re: Need Some Help for my First DMOD

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:
 
 
July 9th 2004, 07:09 AM
farmer.gif
hi astral. welcome to the dink network.

if you want to make a script so that when you enter the room with the boss, it plays the music, and the music stops when he dies, then add these few lines to your script (which should be attached to him).

void main (void)
{
playmidi("x.mid"); //where x is the name of the midi that you want to play

//other crap you want to happen now
}

void die (void)
{
stopmidi(); //stops whichever midi is playing
}

as far as making a boss die forever, there are two ways i can think of to do this. this first way works if you created the boss through the editor (dinkedit or windinkedit).

in the same boss script, place this:

void die (void)
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
// this [sprite] was placed by the
editor_type(&hold,type);
editor_seq(&hold, seq);
editor_frame(&hold, frame);
// type means show this seq/frame combo as background in the future
}
}

replace the italicized "type" with an integer according to the following...

0 no change
1 kill sprite completely
2 draw pic from enclosed seq/frame data as a sprite WITHOUT hardness
3 draw pic from enclosed seq/frame data as a BACKGROUND object WITHOUT hardness (can be walked on [but not] behind)
4 draw pic from enclosed seq/frame data as a sprite WITH hardness
5 draw pic from enclosed seq/frame data as a BACKGROUND object WITH hardness (can't walk [on or] behind)
6 kill sprite, but let him come back after 5 minutes
7 kill sprite, but let him come back after 3 minutes
8 kill sprite, but let him come back after 1 minute

this is if you want to set the sprite as a background for later, come back later, or just have it not show up at all, ever again.

next, replace the italicized "seq" with the sequence number of the sprite you want to show for the background. then, replace the italicized "frame" with the frame number of that sequence that you want to show up.

if the boss was created through a script, then you can have a global variable that's set to 0 called, let's say, &bossexist. then, make sure that the boss is only created if that variable is equal to 0. then, when the boss dies, set that variable to 1 to keep him from coming back later.

as far as the hardness goes, can you explain a little bit more about your problem? i'm not sure exactly what you mean by making them all change. i hope this helped. good luck with the dmod!