The Dink Network

talking

August 23rd 2004, 09:21 AM
dragon.gif
is the way to make people talk adding scripts to them or what? i've read the readme of developing things but i've never heard how to make people talk , i know about hardness depth
and all other things... but what to make talking? (on the same way i could ask how to make the start of the d-mod and when i do as it says in the map file no dink.ini or what it is named appears eighter)
August 23rd 2004, 09:25 AM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
I believe the DinkC tutorial explains how to get objects to talk and how to do all those other things.
August 23rd 2004, 09:30 AM
dragon.gif
uhm it dosent exist anymore...
August 23rd 2004, 09:56 AM
slimeb.gif
c3dink
Peasant He/Him
 
just use something like this:
void talk(void)<maybe>
say("`<colorcode here> (your message here)", ¤t_sprite(or 1 for dink))
same goes with say_stop, but dink must be frozen with <freeze(1)>
say_xy is the same, but instead of ¤t_sprite, use xposition, yposition
August 23rd 2004, 07:04 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
You mean the tutorial.txt file is gone from Dink?
August 24th 2004, 03:58 AM
pig.gif
if you want to make some thing talk, its quite easy, try this:

(important note, &curent_sprite is & current _ sprite without the spaces, sorry its a bug in the board.)

the first thing you do, (assuming you already have a dmod skeleton and know how toedit your map) is to go into dinkedit, and pick up a sprite, then press shift and 5, and write something in the box that will apear, like rock, or tree (you'l need to remember what you wrote). you then press enter, and leave dinkedit. then open your skeleton folder, then go into the story directory, and create a note pad file, then enter the following;

void talk (void)
{
say("hi rock your my friend! i like rocks.", 1);
}

this would make dink say hi rock your my friend! i like rocks when you went near it and pressed spacebar. if you want the rock to say something back, its simple. you just write ¤t_sprite instead of 1. eg;

void talk (void)
{
say("hi rock your my friend! i like rocks.", 1);
say("`4thanks dink i like humans to, lets make a cheesy dmod about that", &curent_sprite);
}

notice the "`4" before the dialog, this makes the rock speak in a different colour, (i think `4 is red) if you were to write `2 or `5 it would be a different colour. youl need to experiment with all the different numbers to see what colours they make. after that you save the txt file as rock.c (or whatever you put in when you pressed shift and 5 in dinkedit). after that, fire up your dmod and talk to the sprite you attached thecript to, and just like magic (or dink), he says the stuff you put in! but, how do you make it so dink cant move when you talk to the rock? to easy, heres how;

void talk (void)
{
freeze(1);
say_stop("hi rock your my friend! i like rocks.", 1);
say_stop("`4thanks dink i like humans to, lets make a cheesy dmod about that", &curent_sprite);
unfreeze(1);
}

see, pice of cake! but what does say_stop mean? simple, it means that whenever you press spac while talking to dink it will skip through text to make it less boring having to wait for the text to go away automaticly. (note: if you are talking to a sprite that moves, after freeze just type
freeze(&curent_sprite);

remember to unfreeze it to! that caused a lot of problems for me recently, i had to go through every script in my dmod!)

anyway, pretty easy so far? try to learn this by heart, because youl need it a lot in dmod making.

next thing, talking in other situatitions, open up the script again, (you cant open it directly, you need to load it from notepad if you follow me) simply white below what you wrote;

void hit (void)
{
freeze(1);
say_stop("`4owww, that hurt!", &curent_sprite);
say_stop("you think your sore, i just punched a rock!", 1);
unfreeze(1);
}

quite predictably that makes the rock speak if you punch it. what other commands are there?

void push (void) //not to hard to guess

void touch (void) //once again, im sure you know what i does.

void main (void) //this makes something happen when dink is in the same screen as the sprite

void die (void) //this is when the sprite dies, (can only happen if it has hitpoints)

there might be a few more, im a newbie myself, so... well good luck anyways!

edit: thats wierd, i posted twice!

edit edit: the best way to learn is to go into the develop file, and unzip mysource.zip, and look through dinks story files.

edit edit edit: (sorry) did you say tut 1 and dinkc, that are in the develop file are gone from the file?
August 24th 2004, 04:05 AM
milder.gif
Kory
Peasant He/Him Croatia
 
I highly recommend Christiaan Jansen's tutorial and DinkC reference.