The Dink Network

is this script right

April 27th 2003, 08:41 AM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
void main( void )
{
int &karl;
int &karl = create_sprite(290, 230, 16, 381, 1);
sp_speed(&karl, 2);
sp_base_walk(&karl, 380);
}

void talk(void)
{
choice_start()
"hello"
"have you seen a guy named per"
"nevermind"
choice_end()

if (&result == 1)

{
say("hi whats your name", 1);
say("`2my name is karl", &karl);
}

if (&result == 2)
{

say_stop("have you seen a guy named per", 1);
say_stop("`2meaby.... has he blue clothes on today", &karl);
say_stop("yes!", 1);
say_stop("`2i saw him with a farmer for some minuttes ago", &karl);
say_stop("where did he go", 1);
say_stop("`2 he said he should go northwest", &karl);
}
}
April 27th 2003, 08:47 AM
death.gif
Keeper
Peasant He/Him
 
choice_start()
"hello"
"have you seen a guy named per"
"nevermind"
choice_end()

It Should be
choice_start()
set_y 240
set_title_color 15
title_start();
What Do you say?
title_end();
"hello"
"have you seen a guy named per"
"nevermind"
choice_end()
April 27th 2003, 08:51 AM
spike.gif
Yup, it's right, but it'd be nicer if you'd do it like below...

void main( void )
{
int &karl = create_sprite(290, 230, 16, 381, 1);
sp_speed(&karl, 2);
sp_base_walk(&karl, 380);

preload_seq(381);
preload_seq(383);
//preload_seq(385);
preload_seq(387);
preload_seq(389);
}

void talk(void)
{
freeze(1);
freeze(&karl);

choice_start()
"hello"
"have you seen a guy named per"
"nevermind"
choice_end()

if (&result == 1)
{
say_stop("hi whats your name", 1);
say_stop("`2my name is karl", &karl);
}

if (&result == 2)
{
say_stop("have you seen a guy named per", 1);
say_stop("`2meaby.... has he blue clothes on today", &karl);
say_stop("yes!", 1);
say_stop("`2i saw him with a farmer for some minuttes ago", &karl);
say_stop("where did he go", 1);
say_stop("`2 he said he should go northwest", &karl);
}

unfreeze(1);
unfreeze(&karl);
//return;
}

also using wait(); between people talking is recommended.
April 27th 2003, 08:52 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Looks mostly o.k. to me. Um.. if you int &karl on one line you don't need "Int" when you create_sprite. Or just int&karl= creat... on one line. (you only need to int a var once.) Usually when you start a talk () its nice to freeze both sprites otherwise they wander around while talking (remember to unfreeze ).
Is this script going to be attached to &karl. As written it seems to be on another (&karl isn't there yet).
April 27th 2003, 08:54 AM
death.gif
Keeper
Peasant He/Him
 
This message has been here for like 3 days and only after I place a message do people come, Whats with that??
April 27th 2003, 08:55 AM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
thanks for the help
April 27th 2003, 08:57 AM
spike.gif
3 days?? 10 minutes or so.
April 27th 2003, 08:58 AM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
i tried all your tips but when i press spacebar nothing happens
April 27th 2003, 08:59 AM
death.gif
Keeper
Peasant He/Him
 
more like 4 hrs
April 27th 2003, 09:01 AM
spike.gif
What are you saying?? That message was posted 20 minutes ago.
April 27th 2003, 09:05 AM
death.gif
Keeper
Peasant He/Him
 
No it wasnt, it was psoted at 8 and its 1:00pm
April 27th 2003, 09:07 AM
spike.gif
That must be because the clock isn't in the same time as in your country.
See clock is now 7:06 PM in where I live in, Finland.
April 27th 2003, 09:09 AM
death.gif
Keeper
Peasant He/Him
 
Ya well its 1:00pm in Nova Scotia CANADA
April 27th 2003, 09:12 AM
spike.gif
Nova Scotia, funky name.
April 27th 2003, 09:25 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
This script isn't yet on &karl. After &karl is created, add
sp_script(&karl,"scripname");
April 27th 2003, 12:18 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
Scratcher is correct here, so the board time probably isn't aligned to your time. You can change the time zone that the board follows under Preferences.
April 27th 2003, 04:45 PM
anon.gif
Paul
Ghost They/Them
 
Are you trying to talk to "Karl" or the sprite the script is attached to? Because it's not going to do anything if you talk to Karl. If you want it to, mvoe the talk() function (everything from void talk(void) to the end) into a new script and attached it to Karl like this:
sp_script(&karl, "myscript");
April 28th 2003, 01:07 PM
fish.gif
binirit
Peasant She/Her
 
Nothing about the scripting, dude, but watch the spelling and use some capitals and such. It reads so much easier. Yeah, I know, I'm a big bore.
May 4th 2003, 05:46 AM
old.gif
You dont need to use a title_start and title_end his choice start is correct