The Dink Network

luthekar's Profile

I'm from northern Indiana and fairly new to the amazing world of Dink. I have been floating around here and there for almost a year playing some great D-mods. I've always had an interest in creating my own game and learning some code, and this is definitely the place to start. My favorites are the funny ones, which is what drew me to the original game by Seth, (Dink's Aunt getting beat by her husband was the kicker) and of course the Quest for Cheese. (Two words: Pixie Poops)

So here I am, giving a shot at creating my first D-mod. Thanks to all those who supported the community and have made and released both great D-mods, and great Development resources. It's nice to see a game and community like this last for so long, and that's the reason why.

E-Mail luthekar@hotmail.com
Private Message
MSN luthekar@hotmail.com

2007-02-16 06:20:34
dragon.gif
I want to make it so that a lot of NPC's sometimes say 2 different things, and don't say the same thing twice in a row. I've been trying to make it so that it uses a local variable. So far, however, I have had no luck, and I've tried rearranging stuff as much and as many times as I can think of.
So is this possible with local variables, and if so, am I using them wrong, or is it certain things in the wrong place or order. So far what I have is:

void main(void)
{
int &convo = 1;

}

void talk(void)
{

if (&convo == 1);
{
freeze(1);

//conversation

&convo += 1;

unfreeze(1);
}

else

if (&convo == 2);
{
freeze(1);

//conversation 2

unfreeze(1);
}
}
Most of the times after I've rearranged the if, else, and variable assignment positions, both conversations just run together as one (like what happens in the example above.) There was only one time I got it to just go through the first conversation only, but the next time I talked to the NPC, they still had the 1st conversation only. (I've rearranged them too many times to remember exactly how I had it that time)

So am I doing it wrong, or is it just not possible to do with a local variable? I'm tired of messing with it for now and searching through other sources for examples, heheh.

Thanks