Conversation Scripts
How do I make Dink say something when he walks onto or appears onto a certain screen? And can someone give me a working story thing? I do this "if &story ==1" and "say_stop "1'The story has progressed by one" &story ==2" but it doesn't seem to work! I'm a shattered sould on the shore of sadness. Ssssss.
void main(void)
{
if (&story == 1)
{
freeze(1)
say_stop("Story is 1, soon it'll be 2!", 1);
&story = 2;
unfreeze(1)
}
}
Attach that script to a sprite on a screen and it'll make Dink say that. The freeze commands prevent him from moving, the say_stop (as opposed to say) pauses the script and allows the player to use spacebar to skip and then &story = 2 sets &story to two.
Edit: redink1, fix the board for the next gen: when modifying a post with script in it, it places everything on one line.. happened to me a few times
{
if (&story == 1)
{
freeze(1)
say_stop("Story is 1, soon it'll be 2!", 1);
&story = 2;
unfreeze(1)
}
}
Attach that script to a sprite on a screen and it'll make Dink say that. The freeze commands prevent him from moving, the say_stop (as opposed to say) pauses the script and allows the player to use spacebar to skip and then &story = 2 sets &story to two.
Edit: redink1, fix the board for the next gen: when modifying a post with script in it, it places everything on one line.. happened to me a few times
"Attach that script to a sprite on a screen and it'll make Dink say that. The freeze commands prevent him from moving, the say_stop (as opposed to say) pauses the script and allows the player to use spacebar to skip..."
Yeah I knew that. Thanks for the other info though but how do I make Dink say something when he walks on a certain screen?
Yeah I knew that. Thanks for the other info though but how do I make Dink say something when he walks on a certain screen?
If you want Dink to say something when he enters a screen, place it in void main(void) like I did in the example script. If you want to make him say it regardless of the value of the &story variable, just remove the if-statement. Or, if you want Dink to say something every x seconds, do:
void main(void)
{
mainloop:
say("Hey, I say this every 5 seconds", 1);
wait(5000);
goto mainloop;
}
Now it loops every 5000 milliseconds which is 5 seconds.. you can change that of course if you want a different timing.
void main(void)
{
mainloop:
say("Hey, I say this every 5 seconds", 1);
wait(5000);
goto mainloop;
}
Now it loops every 5000 milliseconds which is 5 seconds.. you can change that of course if you want a different timing.
if (&player_map == xxx)
{
say_stop("Ho you little dwarf guy", 1);
}
if you use the same script on multiple screens. If you need to do it in a surviving script then you need a loop, ie.
loop:
if (&player_map == xxx)
{
say_stop("Ho you little dwarf guy", 1);
}
wait(100);
goto loop;
otherways just placing a sprite on a screen and giving it a script or making the script the base script of the screen (press B- be careful with that though, the base script gets copied with the screen) will do, like simeon said.
@REDINK: I wish the next generation would be more script-friendly. disable emoticons checkbox would be useful too...
{
say_stop("Ho you little dwarf guy", 1);
}
if you use the same script on multiple screens. If you need to do it in a surviving script then you need a loop, ie.
loop:
if (&player_map == xxx)
{
say_stop("Ho you little dwarf guy", 1);
}
wait(100);
goto loop;
otherways just placing a sprite on a screen and giving it a script or making the script the base script of the screen (press B- be careful with that though, the base script gets copied with the screen) will do, like simeon said.
@REDINK: I wish the next generation would be more script-friendly. disable emoticons checkbox would be useful too...