The Dink Network

He won't stay dead!

May 26th 2006, 10:07 AM
pq_water.gif
Another irritating problem... At a certain time in the game, I kill off one of the npcs with a rather clumsy hurt() procedure. All works well and he explodes in a nice splatter of blood. However, he won't stay dead. When Dink re-enters the screen, there he is, wandering around... until Dink talks to him, when he re-explodes. How do I make him stay dead???????
May 26th 2006, 11:12 AM
spike.gif
int &hold = sp_editor_num(&current_sprite);
editor_type(&hold, 1);
May 26th 2006, 11:17 AM
pq_water.gif
Aah... like the item scripts (potions etc) Thanks scratcher!
May 26th 2006, 04:09 PM
dragon.gif
I've always wondered what exactly that did. Know I know. Thanks, scratcher. All I used to know was that it was a neccessary part of the potion and enemy scripts.

Also I noticed the enemies use:

editor_type(&hold, 6)

Anyone know why this is and what difference six makes to 1.
May 26th 2006, 04:20 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Here you go. A list of editor_type numbers:

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
May 26th 2006, 06:17 PM
dragon.gif
Here you go. A list of editor_type numbers...

Cool, thanks, magicman. I'm going to copy and past that into a text file that I'll place with the other dink tutorials I have (I have pretty much all of them).
May 26th 2006, 07:16 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
That list is already in the DinkC Reference (pretty much any version, I think).
May 26th 2006, 10:43 PM
dragon.gif
That list is already in the DinkC Reference (pretty much any version, I think).

What with university I havn't had the time to read through such a large diocument. Nor have I had the inlination to do so, even before I started at university.
May 26th 2006, 11:08 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
But, if you wanted to learn what editor_type did, the DinkC Reference would be the first place to look.
May 27th 2006, 09:32 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
That's why you can search the document using #command_name .
May 27th 2006, 04:20 PM
pq_water.gif
Speaking of the DinkC Reference, that is one brilliant piece of work. It's constantly open when I'm scripting... so thanks everyone who put it together!
May 27th 2006, 04:51 PM
dragon.gif
That's why you can search the document using #command_name .

Really? Cool! I didn't know that.