help making quest scripts!
See i havent used the board in like amonth and i have been wqorking on a D-mod for a long time all i need now is how to make the sotry scripts like lets say i talked to some guy and he asked me to get something for him. and then i grabbed that item!
How do make it after i grab the item to have him say something after? like change what he says me and Kory would like to know that please help us well me thanks alot!
How do make it after i grab the item to have him say something after? like change what he says me and Kory would like to know that please help us well me thanks alot!
Here is an example:
global_int = &story;
&story = 1;
ITEM:
void main(void)
{
if (&story == 1) sp_kill(&current_sprite, 1);
}
void talk(void)
{
say("Hey a broom", 1);
&story = 3;
sp_kill(&current_sprite, 1);
}
MAN:
void talk(void)
{
if (&story == 3) goto after;
if (&story == 4) goto done;
BEFORE:
say_stop("Can you find my broom?", &current_sprite);
&story = 2;
goto end;
AFTER:
say_stop("Hey, its my broom!", &current_sprite);
&story = 4;
goto end;
DONE:
say_stop("You already found it", &current_sprite);
END:
}
global_int = &story;
&story = 1;
ITEM:
void main(void)
{
if (&story == 1) sp_kill(&current_sprite, 1);
}
void talk(void)
{
say("Hey a broom", 1);
&story = 3;
sp_kill(&current_sprite, 1);
}
MAN:
void talk(void)
{
if (&story == 3) goto after;
if (&story == 4) goto done;
BEFORE:
say_stop("Can you find my broom?", &current_sprite);
&story = 2;
goto end;
AFTER:
say_stop("Hey, its my broom!", &current_sprite);
&story = 4;
goto end;
DONE:
say_stop("You already found it", &current_sprite);
END:
}
STRANGE:
The board automaticly changes current_sprite into ampcurrent_sprite
The board automaticly changes current_sprite into ampcurrent_sprite
First of all, it should be:
make_global_int("&story", 0);
in main.c
Then, you should use
kill_cur_item();
instead of sp_kill(¤t_sprite, 1);
And, you could also do it like this:
void talk(void)
{
if (&story == 1)
{
//conversation
&story = 2;
}
if (&story == 0)
{
//conversation
&story = 1;
}
}
make_global_int("&story", 0);
in main.c
Then, you should use
kill_cur_item();
instead of sp_kill(¤t_sprite, 1);
And, you could also do it like this:
void talk(void)
{
if (&story == 1)
{
//conversation
&story = 2;
}
if (&story == 0)
{
//conversation
&story = 1;
}
}
[b] First of all, it should be:
make_global_int("&story", 0);
in main.c[/b]
DUH I said that, you should use the global &story, because global &story already exists.... you dont need to recreate that.
And the item script I made was for the item on the floor smartass not in your inventory. And when you pick it up it disappears and its not in your inventory but you still have it ( &story is 3 )
make_global_int("&story", 0);
in main.c[/b]
DUH I said that, you should use the global &story, because global &story already exists.... you dont need to recreate that.
And the item script I made was for the item on the floor smartass not in your inventory. And when you pick it up it disappears and its not in your inventory but you still have it ( &story is 3 )
Ok, but you still can't do this :
global_int = &story;
global_int = &story;
I know, but I didnt say it was a command because it isnt in a procedure