The Dink Network

Reply to Re: Talking

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
May 7th 2005, 09:54 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
If you want Dink to talk, do:

say("text", 1);
or:
say_stop("text", 1);

The difference is that the first one lets Dink say it and the second one pauses the script: it waits before doing the next line (and the player can skip by pressing spacebar).

If you want the sprite the script is attached to say something, do:

say("text", &current_sprite);
or:
say_stop("text", &current_sprite);

If you want any sprite on the screen to say something, use:

int &crap = sp(xx);
say("text", &crap); (or say_stop)

where xx is the number of the sprite in the editor.

Now, in a script, it would need to be in the void talk(void) part to make it work when Dink presses spacebar:

void talk(void)
{
freeze(1)
freeze(&current_sprite)
say_stop("Hello", 1);
wait(250);
say_stop("`6Heya!", &current_sprite);
wait(250);
say_stop("Bye", 1);
unfreeze(1)
unfreeze(&current_sprite)
}