Boss Help
I need help in my D-Mod:
I want a stairwell to appear with a warp attached only after you kill a boss monster- this is the only way out of the screen. Unfortunately I have found no way to do this that actually works: I tried using visions, create_sprite... but unfortunately my scripting ability is very limited and I have not been able to write one that actually works. Scripts/Help/Suggestions would be very useful.
I want a stairwell to appear with a warp attached only after you kill a boss monster- this is the only way out of the screen. Unfortunately I have found no way to do this that actually works: I tried using visions, create_sprite... but unfortunately my scripting ability is very limited and I have not been able to write one that actually works. Scripts/Help/Suggestions would be very useful.
How about you attach a script to an inanimate object that checks to see whether or not the boss is dead? Or would a kill function do the trick? I haven't played with DinkC in a while.
Try adding this: EDIT: In the void die() procedure of the boss that is... END EDIT
int &stair = create_sprite(x,y,0,428,3);
sp_script(&stair,"stair");
The stair's script:
void main(void)
{
sp_touch_damage(¤t_sprite,-1);
}
void touch(void)
{
sp_touch_damage(¤t_sprite,0);
sp_x(1,x);
sp_y(1,y);
&player_map = new_location;
load_screen();
draw_screen();
}
You might want to play around with fade_up and fade_down a bit in the stair's script, but that's up to you.
int &stair = create_sprite(x,y,0,428,3);
sp_script(&stair,"stair");
The stair's script:
void main(void)
{
sp_touch_damage(¤t_sprite,-1);
}
void touch(void)
{
sp_touch_damage(¤t_sprite,0);
sp_x(1,x);
sp_y(1,y);
&player_map = new_location;
load_screen();
draw_screen();
}
You might want to play around with fade_up and fade_down a bit in the stair's script, but that's up to you.
checking for the boss in the stair script would be silly because you would need to do a loop
all you have to do is in the boss's die script create the stairs
create_sprite command
then set its properties
then you are all set
if you want the stairs to be permanent
also have the stairs already in the room
with sp_active set to 0
so when the screen is loaded
THEN it checks for the boss
and doesnt kill itself when the screen
is
loaded
all you have to do is in the boss's die script create the stairs
create_sprite command
then set its properties
then you are all set
if you want the stairs to be permanent
also have the stairs already in the room
with sp_active set to 0
so when the screen is loaded
THEN it checks for the boss
and doesnt kill itself when the screen
is
loaded
I tried doing what Metata and josh suggest- I can get the stairs to appear, but they do not warp me when I touch them, even though it is scripted to do such... Do the stairs need to be hard or something... this is really bothering me.
Alright, I have got it working - I even got the secret sound and that cool explosion graphic to appear where the stairs are.
Just a kind of random question, but is this boss anything special? I mean does it have some kind of special attack or certain way to defeat, or is it just a monster with higher stats? (life/defense/strength)
No, he is just a dude who does touch damage... about as complicated as a pillbug.