A bit of a help neeed
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?
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(¤t_sprite);
say_stop("My statue!", 1);
}
unfreeze(1);
unfreeze(¤t_sprite);
}
What's the problem?
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(¤t_sprite);
say_stop("My statue!", 1);
}
unfreeze(1);
unfreeze(¤t_sprite);
}
What's the problem?
It should be:
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
say_stop("My statue!", 1);
unfreeze(1);
unfreeze(¤t_sprite);
}
The number of open braces should always add up to the number of closed braces.
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
say_stop("My statue!", 1);
unfreeze(1);
unfreeze(¤t_sprite);
}
The number of open braces should always add up to the number of closed braces.
You've already made dmods with lots of scripted stuff. How come you don't know how to attach a script??
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.
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.
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.
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.
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.
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).
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.
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.