The Dink Network

A bit of a help neeed

April 29th 2007, 12:10 PM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I have problems with map. I've started with new map. But, now I'm stuck in a hard part. How can I make something that you can't walk through? Like "nothing's in my map yet. I made some crass (which you can walk through) but how do I make a tree?" I mean, you can't walk through a tree, that's for sure. So, how do I do it?
April 29th 2007, 12:12 PM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Never mind! Got that out!
April 29th 2007, 12:44 PM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Now, I have a problem with scripting...

I have named a statue in village as "dstatue". Then I made the same named script (as a 'c.') to 'STORY'. But it won't work.

I've done it like this:

// Dink's statue

void talk( void )
{
freeze(1);
freeze(&current_sprite);
say_stop("My statue!", 1);

}
unfreeze(1);
unfreeze(&current_sprite);
}

What's the problem?
April 29th 2007, 12:59 PM
goblinm.gif
It should be:

void talk( void )
{
freeze(1);
freeze(&current_sprite);
say_stop("My statue!", 1);
unfreeze(1);
unfreeze(&current_sprite);
}

The number of open braces should always add up to the number of closed braces.
April 29th 2007, 01:30 PM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
No... it didn't work!
April 29th 2007, 02:07 PM
goblinm.gif
You've already made dmods with lots of scripted stuff. How come you don't know how to attach a script??
April 29th 2007, 05:01 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
It could be that he used already made scripts as a base before and is now just naming a text file whatever.c, so it's still a text file. If that's the case, you can use a .c editor (there are a few on this site) or remember to "save as" a .c file.

When saving your script, go to "save as" set the "save as type" to "all files" and then just put the name as "whatever.c"

For a DinkC editor, I personally use this one. It works good for me, but I can't say it's the best since I haven't used others.
April 29th 2007, 08:32 PM
bonca.gif
MichaelV
Peasant He/Him Australia
It's all in the mind, you know 
Yeah, I use the DinkC editor myself. Just read my over-inflated review and try it. It's pretty easy to get the hang of, and it can tell you where you go wrong.

When you rename a text file to whatever.c from whatever.txt, I'm pretty sure it's still has the same info and stuff in it, just a different extension. I think I've done it a couple of times and it worked fine.
April 29th 2007, 08:52 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
What rabidwolf9 means is that, by default, naming a file "script.c" will result in a file that's actually called "script.c.txt", which won't be recognised by the Dink engine.
April 30th 2007, 03:23 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Not if you turn off the "hide common filetypes" option in Windows' folder settings... I suggest everyone disables that option, because hidden filetypes are annoying as hell (not identified by .txt anymore, but only by the icon, which can be confusing if the icon ever changes, and preventing stuff like file.c.txt).
April 30th 2007, 03:53 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I'm pretty sure that notepad's default is to save as ".txt", and when you type in "script.c" as name, you'll have a file called "script.c.txt". If it appears as "script.c.txt" (hide common filetypes disabled) or "script.c" (hide common filetypes enabled) doesn't matter.
April 30th 2007, 05:14 PM
duck.gif
wesley
Peasant He/Him United States
 
I don't hide my extensions so you can see what the actual extension is on a file. I use Notepad to write my scripts although I will open them in some C editor I downloaded here sometimes to count brackets and indent and such.
April 30th 2007, 07:04 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Could be, I don't use the original Notepad anymore anyway so I don't have any of those problems anymore (google Notepad2).

Oh yeah, a fix to this is select "all files" as the filetype before saving, or put the filename in double quotes.