The Dink Network

Slayer Bug

August 16th 2004, 04:37 AM
pig.gif
sjoerdje
Peasant He/Him Netherlands
Lava pig to the rescue! 
Hey all,
I have an endingboss slayer, but when he dies two strange things happen...
1. There is only exp given, but no money and heart. The exp is mentioned in the main void but the others in the die process..
2. The dead body of the slayer disappears after pressing space or waiting untill the sentence is finished. This is the die void:

void die( void )
{
screenlock(0);
say("Let's see if Pim is OK...", 1);
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","xlarge");
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);
}

I hope someone can help me!
Greetings, Sjoerdje
August 16th 2004, 05:00 AM
spike.gif
try putting the say command in the end
August 16th 2004, 05:23 AM
pig.gif
sjoerdje
Peasant He/Him Netherlands
Lava pig to the rescue! 
I tried that but that didn't matter...
I also tried it without any line, didn't matter either.
Next I tried with less Exp. Results:
You didn't go up a level so you won't have to click an atribute you want to raise. The dead slayer lies where you killed him, doesn't disappear.. But still, drops nothing...
August 16th 2004, 06:23 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Don't put anything in the main, only have a spawn script in the die that does all you want, and see if that helps (use add_exp() in the spawned script)

Or check out the seth boss script from main game to see what he did.
August 16th 2004, 07:36 AM
spike.gif
You silly thing, you should've mentioned that in the first post! Now I'm so mad at you....

Anyways, the screen is always redrawn when you levelup so all blood and corpses disappear. Try what SimonK said. (I dunno if putting &update_status = 0; in the die procedure would do the trick....hmm...that'd propably screw something up)

As for yer second problem, make sure that you load the globals &save_x and &save_y in main.c
August 16th 2004, 08:47 AM
pig.gif
sjoerdje
Peasant He/Him Netherlands
Lava pig to the rescue! 
Ah yes, I forgot to load those globals, thanks scratcher.
As for the disappearing, I'll just make sure that dink won't get too much exp
August 16th 2004, 10:07 AM
goblinm.gif
Um... am I missing something? Why *wouldn't* you have initialized save_x and save_y?
August 16th 2004, 10:46 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
For some reason they aren't in the skeleton, I believe...
August 18th 2004, 05:14 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
That's where Mike made a great job a bit crappier. Some of the graphics are missing too.
August 18th 2004, 06:14 AM
spike.gif
I think those graphics are intentionally missing. but it sucks anyway. that's why I never use skeleton B.
August 18th 2004, 11:15 AM
goblinm.gif
I don't know what you guys are smoking, but the skeleton b I downloaded most certainly initializes save_x and save_y. Maybe you've an old version?
August 18th 2004, 11:54 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
I dunno. I've never noticed that myself. I just know that some of the graphics are missing.
August 18th 2004, 12:39 PM
anon.gif
MiloBones
Ghost They/Them
 
Looking through the dinkvar.h file in the source, Seth assigns pointers (? My C++ is quite rusty) to a bunch of globals, like strength and lifemax and so on, but not to save_x and save_y.

This isn't relevant, but it is interesting, given the wording of main.c
August 21st 2004, 02:36 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
Yep, but save_x and save_y is needed in (virtually) every D-Mod, because the items-spawned-when-monsters-die-script (eg. emake.c) uses save_x and save_y to place the bonuses.
August 21st 2004, 09:57 AM
anon.gif
MiloBones
Ghost They/Them
 
I believe the winking blue star effect you get from an elixir uses them as well.
August 21st 2004, 10:55 AM
spike.gif
yeah, as does a number of other things. those two globals are very important when making an ordinary dmod...