The Dink Network

Need Help

March 13th 2006, 08:49 PM
anon.gif
katym
Ghost They/Them
 
I'm trying to learn to make a D-Mod and have been using WinDinkEdit, but, despite reading what I can and looking at other D-Mods, I haven't been able to figure out how to animate sprites such as fountains and fireplaces. I read that using shift+4 in DinkEdit might work, so (because I couldn't figure how to edit mine otherwise) I moved DinkEdit to my D-Mod's folder to edit it. When I try to play it now, all my sprites are ghostly and horizontally compressed, although it looks fine in WinDinkEdit. What happened? Can what I was working on be saved? And how do you animate those sprites?
March 13th 2006, 09:55 PM
anon.gif
katym
Ghost They/Them
 
Okay, the game's sprites were messed up. All my D-Mods were funky. I reinstalled the game and it seems to work again... I don't know what I did, but I won't do it again.
March 13th 2006, 10:28 PM
anon.gif
kjmarket
Ghost They/Them
 
To animate sprites such as the fireplace fire, you need to set it's brain to the repeating brain...and the fire sound. This can be done in the editor or by script.

WinDinkEdit gives you the sequence of a sprite, by right clicking and going to properties. If you spawn the sprite using a script, you would need to set that sequence.

void main( void)
{
sp_brain(&current_sprite, 6);
sp_sound(&current_sprite, 23);
}

That simple bit of code will give you a working fireplace with the fireplace sound effect.

Now if you wanted to make something animate when you hit it, then that can be accomplished quite easily. I threw this together in a few minutes. I have a sprite than when hit, it spawns a different sprite and animates it ( a blood ring ). I attached the script to one of the weird poles that you tend to see near goblin huts.

void hit( void)
{
int &thisone = create_sprite(358, 57, 7, 162, 1); ( one line )
sp_seq(&thisone, 162);
}

This spawns a blood ring looking sprite when the pole is hit. The first two numbers of the create_sprite line are the x and y coordinates. The 4th ( 162) is the sprite number ( sequence ). The next line tells it what sequence to start playing for what sprite.

March 13th 2006, 10:32 PM
duckdie.gif
Ignore the (one line ) comment. It cut the line in half at first, but when I posted it it was fine again. Let me know if you need anything else.
March 14th 2006, 06:15 PM
pq_water.gif
It is possible that you missed the obvious though... like putting in the fire graphics into the fireplace... or putting the water sequence on the fountain... (admittedly, my thinking-sideways brain missed this one at first... or maybe it was just the lack of sleep)