The Dink Network

Now pulling my hair out................

July 5th 2003, 01:48 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
void die ()
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}
This is in a die proc. from the dink source, and it works well to kill off a sprite in the original, but when I use it in my dmod, the sprite always comes back. Can anyone tell my why?(please hurry, I have little hair to spare..)
<edit>
These are in editor placed sprites, not create_sprites
July 5th 2003, 03:41 PM
goblinm.gif
trav666
Peasant He/Him
 
maybe its...

void die(void)
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}
July 5th 2003, 09:11 PM
burntree.gif
jane
Peasant She/Her
 
lol!
July 5th 2003, 10:14 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
adding void in the brackets makes no differance.
These same lines work right in some scripts (creatures), but not others (scrolls picked up or rocks blown up.)
wierd.
Now drawing a toupee with MS paint.......
July 6th 2003, 08:01 AM
wizardg.gif
Paul
Peasant He/Him United States
 
This is a long shot maybe, is this in a room you enter or leave by way of a scripted warp? I've had problems with editor_type and scripted warps. (but not standard warp sprites)
July 6th 2003, 08:36 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Good insight, but no. Most of these you just walk up to. Mabey I'll just waste a few globals and kill them.
July 6th 2003, 03:09 PM
wizardg.gif
Paul
Peasant He/Him United States
 
One other thing you can try: copying the world to a new map, screen by screen. Sometimes it just seems to get corrupted or something, and that fixes it. It's pain for sure though.
July 6th 2003, 04:23 PM
fish.gif
Binirit
Peasant She/Her
 
It sure is. Nothing could be found in mine, though, but still it worked importing it into a new map.
July 6th 2003, 05:12 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Thats just crazy enough to work....
July 6th 2003, 09:22 PM
old.gif
try this one:

void die(void)
{
editor_type(&current_sprite, 1);
}
July 7th 2003, 11:37 AM
wizardg.gif
Paul
Peasant He/Him United States
 
theprophet:
try this one:

void die(void)
{
editor_type(&current_sprite, 1);
}


I wouldn't if I were you. That'll kill something else more or less at random.
July 7th 2003, 12:26 PM
old.gif
I always use it, because I place the things with that command in the editor and I dont use it with create_sprite... no worries
July 7th 2003, 08:28 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
I fixed it with
void main ()
{
int &gotit = count_item("item-name")
if(&gotit != 0)
{
sp_active(¤t_sprite,0);
}
}
If I've been there, it disapears before I can see it.
(in time that I can still do a comb-over)