is this script right
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);
}
}
{
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);
}
}
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()
"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()
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.
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.
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).
Is this script going to be attached to &karl. As written it seems to be on another (&karl isn't there yet).
This message has been here for like 3 days and only after I place a message do people come, Whats with that??
thanks for the help
i tried all your tips but when i press spacebar nothing happens

What are you saying?? That message was posted 20 minutes ago.
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.
See clock is now 7:06 PM in where I live in, Finland.
This script isn't yet on &karl. After &karl is created, add
sp_script(&karl,"scripname");
sp_script(&karl,"scripname");
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

Paul


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");
sp_script(&karl, "myscript");
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.

You dont need to use a title_start and title_end his choice start is correct
