The Dink Network

Maybe if you type real slow I will understand

July 12th 2004, 09:03 PM
duckdie.gif
Alrighty then for a month now I have been hard at work trying to cobble together a D-mod.

In the process I have downloaded WinEdit, all of the tutorials, printed and read and read and reread all of them.

I have borrowed scripts from Dink, I borrowed scripts from the "Rudiments of Scripting".

And still I can't figure it all out. So now I am going to ask questions, most likely lots of them, more than you all will want to hear.

First I never, ever scripted before. Before this Dmod I never heard of C++, never bothered to look at programming, my skills were at the level of point and click. So forgive my ignorance - again, if you type real slow I might get it Yes be condesending if you need to, but be gentle this is my first time.

I started off with a Skeleton B blank - thought that would be easier than trying to copy and paste and cobble together a functioning File. BTW I have one which I tried to compile as per the Tutorials - it doesn't do anything.

Yes I have made a nice map, figured out how to use WinEdit to do it, using invisible fences for hard boxes, figured out when and where to use hard and not hard, I finally found a use for Background sprites and person sprites. I amazed myself when I made my first walking quaking duck, was thrilled when I got a red heart and a gold heart to not walk like a duck and fill life - Was flabbergasted that I was able to make a pill bug function, and it took me a little while longer to figure out why my bonca just wiggled around in the middle of the screen.

but there are things which I still do not understand. So here is the first.

Lets start with a simple problem. I have a sign which will direct the player to a place to get magic fire ball here is the script:

***********************************
void hit(void)
{
say("`3Big man hits the sign.", &current_sprite);
}

void talk(void)
{
say("The Witch!.",1);
wait(500);
wait(500);

say("`3Learn Magic!", &current_sprite);

wait(500);
wait(500);

say("She Lives to the south.",1);
}
***********************************************

Hit void doesn't work. I can stand there and hit the sign over and over again, nothing happens. Thunk, thunk thunk - no words. Its a sign which hangs ont he wall. I tried making the wall not hard, and using an invisable fence behind the sign which is hard, I tried a hard wall hard sign, I even went so far as to put the sign in the middle of the room. Hit void doesn't work.

Why two wait 500? Because one wait 500 causes the scripts to run together - meaning that Dink and the sign speak at the same time, well pretty darn close.

I get the conversation throught The space bar, still goes too fast for my liking but it works and you get the idea (I hope) that there is a witch who teaches magic and she lives to the south of the store you are in.

That's fine and well, but I want the funny message for hitting the sign too.

I tried it with this:

******************************
void talk(void)

{
freeze(1);

say_stop("`3Learn Magic - The Witch", &current_sprite);

wait(200);

say_stop("She lives to the south", 1);
unfreeze(1);
}

void hit(void)
{

say_stop("`3Big man hits the sign!", &current_sprite);

wait(200);

say_stop("Shut up, you stupid sign!", 1);

}
*****************************

Now this one I get a conversation when I hit, but nothing when I hit the space bar.

Both of these scripts were coppied from the Rudiments of Scripting, all I changed was the words said in the conversations.

Did I miss something?

Pray tell me what am I doing wrong? I copied both of these scripts and only changed the sentences which are the conversation.

July 12th 2004, 09:22 PM
slayer.gif
Astral
Peasant He/Him
 
for the sign do that

void talk( void )
{
say("The Witch!.",1);
wait(500);
wait(500);
say("`3Learn Magic!", &current_sprite);
wait(500);
wait(500);
say("She Lives to the south.",1);
wait(500);
wait(500);
}

void hit( void )
{
say_stop("`3Big man hits the sign.", &current_sprite);
}
July 12th 2004, 09:24 PM
spike.gif
The scripts are correct, so the problem is somewhere else. I still don't get it why you put wait(500); there two times though, just use wait(1000);

..or use say_stop commands. That's much neater.

void talk(void)
{
freeze(1);
say_stop("The Witch!.", 1);
say_stop("`3Learn Magic!", &current_sprite);
say_stop("She Lives to the south.", 1);
unfreeze(1);
}
July 12th 2004, 09:27 PM
slayer.gif
Astral
Peasant He/Him
 
Yah say_stop is a lot better!
July 12th 2004, 10:30 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
You bone heads should probably explain the diffrence between the two.

Say and say stop:

Say will execute the command for the sprite to say somethign and then continue to execute the rest as the user is 'talking' (by talking I mean the text hovering over their head). Say stop will cause them to 'talk', but will hault the rest on the script.

Example

THis will cause three diffrent sprite to say the exact same hting at once.

say("yeah", &numer_one);
say("yeah", &number_two);
say("yeah", &number_three);

as say stop will cause them to say it one after another with a small pause between them (almost liek they are repeating each other.

say_stop("yeah", &numer_one);
say_stop("yeah", &number_two);
say_stop("yeah", &number_three);

Have fun!
July 12th 2004, 10:37 PM
spike.gif
Nah, learning things through the hard way is better. You'll never forget.....
July 12th 2004, 10:51 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
And maybe if I beat it into you, you wont forget?

Translation. Shut your ugly cock holster.
July 12th 2004, 11:16 PM
spike.gif
Krii!!

I suck, but only sausage.
July 12th 2004, 11:52 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
I think the sex-with-your-mom joke should be pretty obvious here.
July 13th 2004, 01:57 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Or imo better:

say_stop("A", 1);
wait(250);
say_stop("B", 1);
wait(250);
say_stop("C", 1);

July 13th 2004, 02:01 AM
duckdie.gif
Well gee. I liked the explanation part of Say and Say stop - lot better for me.

Learning the hard way may be more fun for some. I am NOT THE ONE.

I will incorporate 'say stop'.

Why not 'Wait 1000' instead of two wait 500s? Because I don't know anything about C dink other than what I have muddle through the tutorials.

I erred on the side of caution.

I have no clue how holstering male Gallus bankiva will do me any good.

cheers

July 13th 2004, 02:07 AM
duckdie.gif
say_stop("A", 1);
wait(250);
say_stop("B", 1);
wait(250);
say_stop("C", 1);

Now that is interesting, I do or do not need wait(xxx) when using say_stop?

See that's one of the things that is throwing me, there are several ways of doing things.

I see examples in sources and I'm being thrown with the diversity.

that and //This will drive pap crazy

and other comments which are as relevant as holstering a Gallus Gallus in this thread.
July 13th 2004, 03:20 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Heh,I was going to suggest using say_stop and wait(250), but Simeon beat me to it!
After a say_stop, a wait(whatevernumber) isn't required, but will just makes the conversation flow a little bit better. Try experimenting, with a...

say_stop("Hello Tree.", 1);
wait(250);
say_stop("`3Tree? I'm a freakin' rock Godammit!!", &current_sprite);
wait(250);
say_stop("Really? My bad...", 1);


...script and a...

say_stop("Hello Tree.", 1);
say_stop("`3Tree? I'm a freakin' rock Godammit!!", &current_sprite);
say_stop("Really? My bad...", 1);


...script. I think you will find the first one is just "nicer".
July 13th 2004, 09:54 AM
duckdie.gif
***************************
void talk(void)

{

say_stop("Learn Magic", 1);
wait(250);
say_stop("See the Witch", 1);
wait(250);
say_stop("<She lives south of here>", 1);

}

void hit(void)

{

say_stop("`3Big man hits the sign!", ¤t_sprite);

wait(200);

say_stop("Shut up, you stupid sign!", 1);

}
***********************************

I can hit the sigh and get "big man hits sign" "Shut up, you stupid sign."

But I can't read it, no matter how often I hit space bar, I get "Huh?" "I don't see anything here." But I can't read the sign.

I made the sign hard - nada
I made the sign not hard - nada.

I removed the wall behind the sign - still nada.

I renamed the file - Nada.

I removed the void hit lines - still no void talk.

I tried every method you all suggested - what am I missing here?????

Now when I put void Hit above void talk part of my script then I get to read the sign, but then I can hit the sign over and over and nothing happens.

Does my sign need a brain? I have no brain for it.

Cheers
July 13th 2004, 10:01 AM
slayer.gif
Astral
Peasant He/Him
 
did you try the one I made?
If it not working try putting in another screen and on another spirit!
July 13th 2004, 10:08 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I don't know what thing causes this bug, but it seems that the first proc is skipped for some reason. Try the following:

void duuude( void )
{
//If it really skips the first proc, it should skip this and not the hit and talk thingies
}

[insert your script here]

Dunno if it works... it's really strange
July 13th 2004, 10:15 AM
duckdie.gif
Finally it is working.

I put in the Void duude lines and now I can talk to to the sign and hit it and it works.

I've been feeling very, very stupid about this, after all I got trees to talk, people to talk, road signs to talk, but not a stupid sign on the wall.

thanks so much for your help guys.

Cheers

July 13th 2004, 10:54 AM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
Ok, the wait command.

The number in the wait() is the number of miliseconds the script will pause before going to the next command. You can see this commonly used between line of two people talking so the first set of text disappears for a fraction of a second before the next set comes up (just makes it look nicer).

wait(1000);

this pauses the script for 1 second.

wait(500);
wait(500);

this will laso pause it for a second, but why use two commands when you could use one?
July 13th 2004, 12:38 PM
duckdie.gif
You know none of the tutorial material seemed to cover the timing of wait commands. Now that I know that wait(1000) is a second I can work with it.

Thanks for the explination.
July 13th 2004, 01:44 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
I can hit the sigh and get "big man hits sign" "Shut up, you stupid sign."

But I can't read it, no matter how often I hit space bar, I get "Huh?" "I don't see anything here." But I can't read the sign.

This is because say can be used at all times to let a sprite say something. But in case you want say_stop and have spacebar to skip text, you'll need to freeze Dink. Otherwise you'll indeed getting him saying stuff like "Huh?" and the like. So:

void talk(void)
{
freeze(1)
say_stop("A", 1);
wait(250);
say_stop("B", 1);
wait(250);
say_stop("C", 1);
unfreeze(1)
}

will work like you want it, including the spacebar.