Scripting Help
Well i made this topic beacuse i don't want to create more of my problems like"say script help,move script help etc." so i wanted to add my problems with scripting in here.So my first help of scripting is how can i make Dink invisible cause i made a Dink sprite as a intro but there are two of them and how can i fix the problem with showing graphic cause i made a message on Paint and it won't show?
EDIT:Also i cancel creating my d-mod called "Dink's Vacation" so i try to made an trillogy d-mod called "The Legend of the Dink".
EDIT:Also i cancel creating my d-mod called "Dink's Vacation" so i try to made an trillogy d-mod called "The Legend of the Dink".
For the "Message-not-showing" bit, did you convert it to the dink pallette and throw it in the Dink.INI? And your other problem, I can't think of off the top of my head.
"For the "Message-not-showing" bit, did you convert it to the dink pallette and throw it in the Dink.INI?"
But how?What should i type on Dink INI?
But how?What should i type on Dink INI?
So my first help of scripting is how can i make Dink invisible cause i made a Dink sprite as a intro but there are two of them
If you want Dink in the intro just make it Dink! Start off your script with 'freeze(1);' Then put stuff like
'move_stop(1, #, #, #);' So it moves Dink. It saves alot of trouble. I would recommend this. Or if you still wanna do what you were gonna do, do 'sp_nodraw(1, 1);' to make Dink invisible I think. It means it won't draw (nodraw) the sprite. Whether it is 1 (Dink) ¤t_sprite, or the name of another sprite, it doesn't matter.
And how can i fix the problem with showing graphic cause i made a message on Paint and it won't show?
In the 'DINK.INI' anywhere, (Down the bottom where it has the message is recommended) since it is a message and not an animation, put 'load_sequence_now graphics/directory/mess-01 NOTANIM' Or 'load_sequence graphics/directory/mess-01 900 NOTANIM' Doesn't matter.
I'll explain it now. Let's say you made a new folder in your GRAPHICS directory of your Dmod and called it MESSAGE. Then you make the BMP and we'll say you called is mess-01. If you had more than one graphic you would make them mess-02, mess-03, all the way to mess-50. You may be able to go higher but I don't know. I don't think you'd have that many graphics in one folder though. Anyway with that settled, in the 'DINK.INI' you would put either 'load_sequence_now' or 'load_sequence' I usually do 'load_sequence_now' I don't think it really matters. Anyway, after that you put the directory. In this case it would be 'graphics/message' Now we put the name of the file. We skip the # because doing what we do adds all the graphics in the folder with mess-#. We go 'mess- ' Finally, we put how we load it. You know, the sequence, frames and all that. But if you aren't doing an animation you only need to put NOTANIM instead of all the other crap. Anyway, you then put '900 NOTANIM' Or if you don't want the sequence to go in sequence 900 in the editor you change the 900 to something else.
If you want Dink in the intro just make it Dink! Start off your script with 'freeze(1);' Then put stuff like
'move_stop(1, #, #, #);' So it moves Dink. It saves alot of trouble. I would recommend this. Or if you still wanna do what you were gonna do, do 'sp_nodraw(1, 1);' to make Dink invisible I think. It means it won't draw (nodraw) the sprite. Whether it is 1 (Dink) ¤t_sprite, or the name of another sprite, it doesn't matter.
And how can i fix the problem with showing graphic cause i made a message on Paint and it won't show?
In the 'DINK.INI' anywhere, (Down the bottom where it has the message is recommended) since it is a message and not an animation, put 'load_sequence_now graphics/directory/mess-01 NOTANIM' Or 'load_sequence graphics/directory/mess-01 900 NOTANIM' Doesn't matter.
I'll explain it now. Let's say you made a new folder in your GRAPHICS directory of your Dmod and called it MESSAGE. Then you make the BMP and we'll say you called is mess-01. If you had more than one graphic you would make them mess-02, mess-03, all the way to mess-50. You may be able to go higher but I don't know. I don't think you'd have that many graphics in one folder though. Anyway with that settled, in the 'DINK.INI' you would put either 'load_sequence_now' or 'load_sequence' I usually do 'load_sequence_now' I don't think it really matters. Anyway, after that you put the directory. In this case it would be 'graphics/message' Now we put the name of the file. We skip the # because doing what we do adds all the graphics in the folder with mess-#. We go 'mess- ' Finally, we put how we load it. You know, the sequence, frames and all that. But if you aren't doing an animation you only need to put NOTANIM instead of all the other crap. Anyway, you then put '900 NOTANIM' Or if you don't want the sequence to go in sequence 900 in the editor you change the 900 to something else.
Thanks for the first problem but in second i don't understand.Another problem:"How can i change screen for example from 1 to 3?"
but in second i don't understand.
Just load it in the DINK.INI as
load_sequence_now graphics/message/mess- 900 NOTANIM
Assuming that you named the file mess-01 in the directory message.
How can i change screen for example from 1 to 3?"
&player_map = 3; will change the screen to map '3'. But when I usually make it 'fade up/down' I do this:
fade_down();
sp_base_walk(1, 70);
sp_base_attack(1, 100);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);
sp_active(&kill, 0);
wait(500);
script_attach(1000);
fill_screen(0);
&player_map = #;
load_screen(#);
draw_screen();
&update_status = 1;
draw_status();
sp_x(1, #);
sp_y(1, #);
sp_dir(1, #);
freeze(1);
fade_up();
Where # is the direction Dink faces, the screen he fades to, the screen it loads and the x and y coordinates.
Hope this helps!
Just load it in the DINK.INI as
load_sequence_now graphics/message/mess- 900 NOTANIM
Assuming that you named the file mess-01 in the directory message.
How can i change screen for example from 1 to 3?"
&player_map = 3; will change the screen to map '3'. But when I usually make it 'fade up/down' I do this:
fade_down();
sp_base_walk(1, 70);
sp_base_attack(1, 100);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);
sp_active(&kill, 0);
wait(500);
script_attach(1000);
fill_screen(0);
&player_map = #;
load_screen(#);
draw_screen();
&update_status = 1;
draw_status();
sp_x(1, #);
sp_y(1, #);
sp_dir(1, #);
freeze(1);
fade_up();
Where # is the direction Dink faces, the screen he fades to, the screen it loads and the x and y coordinates.
Hope this helps!
Whoa! That looks terribly complicated, and it can cause quite nasty bugs too... Doing a script_attach(1000); and no kill_this_task(); is a sure way of crashing the game if you do it a couple of times.
Do it like this: (remove the comments if you like)
//first freeze Dink and let it become dark...
freeze(1);
fade_down();
//Specify the screen Dink will go to
&player_map = #;
//New X and Y coordinates if necessary:
sp_x(1,#);
sp_y(1,#);
//Make the script survive the change of screens:
script_attach(1000);
//Now change screens:
load_screen();
draw_screen();
//Freeze Dink again and make it light again:
freeze(1);
fade_up();
//Rest of the cutscene if necessary
//And don't forget to kill the script afterwards to avoid bugs:
kill_this_task();
Do it like this: (remove the comments if you like)
//first freeze Dink and let it become dark...
freeze(1);
fade_down();
//Specify the screen Dink will go to
&player_map = #;
//New X and Y coordinates if necessary:
sp_x(1,#);
sp_y(1,#);
//Make the script survive the change of screens:
script_attach(1000);
//Now change screens:
load_screen();
draw_screen();
//Freeze Dink again and make it light again:
freeze(1);
fade_up();
//Rest of the cutscene if necessary
//And don't forget to kill the script afterwards to avoid bugs:
kill_this_task();
Ok no i want to change the normal status bar into mine.How can i do that?
Ok another problem.How can i make Dink appear again after sp_nodraw?Cause i'm now making another part of The Legend of the Dink
allright now another problem.WHat shoud i do that one script will not run in the same screen after going to the another screen and return to one where i scripted for example:
First visit on the screen(scripted):
"Let's kick some ass"
<GO to the next screen(unscripted)>
<Returning to the previous screen(scripted)>
"Let's kick some ass"
First visit on the screen(scripted):
"Let's kick some ass"
<GO to the next screen(unscripted)>
<Returning to the previous screen(scripted)>
"Let's kick some ass"
Attach the script to the screen and put what you want to happen in the main procedure. I think that's what your asking..
For WinDinkEdit, go to the screen you want and right click. From there go to properties and you can find the script you want for the screen.
For DinkEdit, open the screen you want scripted, make sure you're in tile mode, and then press B to type in the script name.
For WinDinkEdit, go to the screen you want and right click. From there go to properties and you can find the script you want for the screen.
For DinkEdit, open the screen you want scripted, make sure you're in tile mode, and then press B to type in the script name.
wrong rabidwolf9 i know how to script the screen but what shoud i do to not run the script in scripted screen.I tried with if(&story = 0) ended with &story = 1 but nothing.Here's the script:
void main(void)
{
if(&story = 0)
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
kill_this_task();
&story = 1
}
void main(void)
{
if(&story = 0)
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
kill_this_task();
&story = 1
}
Place the brackets correctly:
void main(void)
{
if(&story = 0)
{
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
//kill_this_task(); is not needed
}
&story = 1
}
void main(void)
{
if(&story = 0)
{
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
//kill_this_task(); is not needed
}
&story = 1
}
void main(void)
{
if(&story = 0)
//There should be a bracket here.
{
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
//This line should be before kill_this_task command, I think.
&story = 1;
kill_this_task();
//Add a bracket here too.
}
}
I think that should do it.
Whoops! Metatarasal explained the problem already
{
if(&story = 0)
//There should be a bracket here.
{
freeze(1);
wait(750);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(250, 215, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(1, 0);
say_stop("Ah finally i'll find this book and kick Seth's ass!", 1);
sp_dir(1, 4)
wait(350);
sp_dir(1, 6);
wait(350);
sp_dir(1, 8);
wait(350);
sp_dir(1, 2);
say_stop("Hmmm i don't see a Temple in here", 1);
sp_dir(1, 4);
say_stop("dang you Matridge you teleported me into bad place!", 1);
unfreeze(1);
//This line should be before kill_this_task command, I think.
&story = 1;
kill_this_task();
//Add a bracket here too.
}
}
I think that should do it.
Whoops! Metatarasal explained the problem already
Tested and problem with the script...Dink won't appear .
Oops, my bad. Didn't see another mistake in your script. This line:
if(&story = 0)
should be:
if (&story == 0)
if(&story = 0)
should be:
if (&story == 0)
Ok i have another problem.How can i do a touch script for example: Dink goes to cave and if he touch a entrance it'll say "Now way i'm not going there!" and came back and how to use a Vision option
Touch script:
void main(void)
{
sp_touch_damage(¤t_sprite,-1);
}
void touch(void)
{
if (&story < 3)
{
say("Now way i'm not going there!",1);
}
}
To use visions... Well I don't like visions, but if you do plan to use them do it like this:
- Set the vision of the thing you want to be visible only when you choose to and give it a vision (not 0)
- In a script attached to the room set the vision, like when you've set the vision for the object to 5, do this:
void main(void)
{
&vision = 5;
}
And you should be fine, I do believe sprites with a vision need to be of the normal type, using background or invisible causes problems.
void main(void)
{
sp_touch_damage(¤t_sprite,-1);
}
void touch(void)
{
if (&story < 3)
{
say("Now way i'm not going there!",1);
}
}
To use visions... Well I don't like visions, but if you do plan to use them do it like this:
- Set the vision of the thing you want to be visible only when you choose to and give it a vision (not 0)
- In a script attached to the room set the vision, like when you've set the vision for the object to 5, do this:
void main(void)
{
&vision = 5;
}
And you should be fine, I do believe sprites with a vision need to be of the normal type, using background or invisible causes problems.
Thanx now i want to know what's difference between < & > in for example if (&story > 3);?
if (&story > 3)
{
say_stop("Blah.", 1);
}
That would run if the &story variable is above 3. Didn't you learn the > greater than < less than thing in school? On more thing...
if (&story >= 3)
{
say_stop("Blah.", 1);
}
That will run if the &story variable is either greater than or equal to 3. (It might be ... &story => 3) I forgot.
{
say_stop("Blah.", 1);
}
That would run if the &story variable is above 3. Didn't you learn the > greater than < less than thing in school? On more thing...
if (&story >= 3)
{
say_stop("Blah.", 1);
}
That will run if the &story variable is either greater than or equal to 3. (It might be ... &story => 3) I forgot.
Well the operators are:
== equal to
>= greater then or equal to
> greater then
< less then
<= less then or equal to
!= not equal to
So >= is correct and => isn't.
== equal to
>= greater then or equal to
> greater then
< less then
<= less then or equal to
!= not equal to
So >= is correct and => isn't.
Thanks but now i have a problem with the new question in choice_start i made this script:
void talk(void)
{
freeze(1);
freeze(¤t_sprite);
choice_start();
"Ask about magic"
"Ask about village"
"Ask about Temple of the Ancients"
(&story == 3)"Tell about the blocking road"
"Nevermind"
choice_end()
if (&result == 1)
{
say_stop("Can you learn me some magic?", 1);
say_stop("`3Of course", ¤t_sprite);
wait(750);
say_stop("`3For 1 million gold.", ¤t_sprite);
say_stop("WHAT?!!I want it for 1000 gold", 1);
say_stop("`3Million gold or no magic", ¤t_sprite);
say_stop("NO WAY I'M OUTTA HERE!", 1);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 2)
{
say_stop("Tell me about something about the village", 1);
say_stop("`3Well you are in Midina village the villagers are peaceful.", ¤t_sprite);
say_stop("`3If not that idiot called Rand!", ¤t_sprite);
say_stop("`3He suspects me that i changed his axe into a stick.What an ass!", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 3)
{
say_stop("Tell me about the Temple of the Ancients", 1);
say_stop("`3Temple of the Ancients?Hmmm i don't know about this temple.Sorry.", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 4)
{
if (&story == 3)
{
say_stop("Hey can you help me?", 1);
say_stop("`3In what?", ¤t_sprite);
say_stop("The road is blocked is there another way to the temple?", 1);
say_stop("`3What?The road is blocked again!.Ok i'll help you.Hold on for a sec", ¤t_sprite);
say_stop("`3Ommmmmm.....Ommmmmmm......", ¤t_sprite);
playsound(24, 22052, 0, 0, 0);
wait(750);
say_stop("`3There you go go south from my house for a secret passage", ¤t_sprite);
say_stop("Erm....Gee...Thanks...", 1);
unfreeze(1);
unfreeze(¤t_sprite);
&story = 4
}
}
if (&result == 5)
{
unfreeze(1);
unfreeze(¤t_sprite);
}
and when it's story = 3 it won't show me.What shoud i do?
void talk(void)
{
freeze(1);
freeze(¤t_sprite);
choice_start();
"Ask about magic"
"Ask about village"
"Ask about Temple of the Ancients"
(&story == 3)"Tell about the blocking road"
"Nevermind"
choice_end()
if (&result == 1)
{
say_stop("Can you learn me some magic?", 1);
say_stop("`3Of course", ¤t_sprite);
wait(750);
say_stop("`3For 1 million gold.", ¤t_sprite);
say_stop("WHAT?!!I want it for 1000 gold", 1);
say_stop("`3Million gold or no magic", ¤t_sprite);
say_stop("NO WAY I'M OUTTA HERE!", 1);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 2)
{
say_stop("Tell me about something about the village", 1);
say_stop("`3Well you are in Midina village the villagers are peaceful.", ¤t_sprite);
say_stop("`3If not that idiot called Rand!", ¤t_sprite);
say_stop("`3He suspects me that i changed his axe into a stick.What an ass!", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 3)
{
say_stop("Tell me about the Temple of the Ancients", 1);
say_stop("`3Temple of the Ancients?Hmmm i don't know about this temple.Sorry.", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 4)
{
if (&story == 3)
{
say_stop("Hey can you help me?", 1);
say_stop("`3In what?", ¤t_sprite);
say_stop("The road is blocked is there another way to the temple?", 1);
say_stop("`3What?The road is blocked again!.Ok i'll help you.Hold on for a sec", ¤t_sprite);
say_stop("`3Ommmmmm.....Ommmmmmm......", ¤t_sprite);
playsound(24, 22052, 0, 0, 0);
wait(750);
say_stop("`3There you go go south from my house for a secret passage", ¤t_sprite);
say_stop("Erm....Gee...Thanks...", 1);
unfreeze(1);
unfreeze(¤t_sprite);
&story = 4
}
}
if (&result == 5)
{
unfreeze(1);
unfreeze(¤t_sprite);
}
and when it's story = 3 it won't show me.What shoud i do?
Your script works fine. Check if story is 3.
Thanks but that's strange when i enter to the screen where is a watch tower with this script:
void main(void)
{
int &wtower = create_sprite(315, 106, 0, 60, 2);
sp_script(&wtower, "guardwindow");
if (&story == 1)
{
freeze(1);
say_stop("Ah finally i taught i never get out from this forest", 1);
move_stop(1, 6, 310, 1);
say_stop("`3Hey you!", &wtower);
sp_dir(1, 8);
say_stop("Who me?", 1);
say_stop("`3Yes you!Come here!", &wtower);
move_stop(1, 8, 160, 1);
say_stop("`3A!ha! just as i taught you're the one who stole my axe!", &wtower);
say_stop("Wha?", 1);
say_stop("`3Don't lie to me i know it's you!", &wtower);
say_stop("`4Rand!", &wtower);
say_stop("`3What?", &wtower);
say_stop("`4Leave him alone!He didn't stole your axe!", &wtower);
say_stop("`3Oh yes he is!", &wtower);
playsound(9,22050,0,0,0);
say_stop("`3Ow!What was that for!", &wtower);
say_stop("`4Shut your mouth about your axe or you guard at the highest tower.", &wtower);
say_stop("`4Now LEAVE HIM ALONE!", &wtower);
say_stop("`3Ok,ok", &wtower);
say_stop("`4Sorry for that traveller cause he always loves his axe.", &wtower);
say_stop("It's ok", 1);
unfreeze(1)
}
&story = 2
}
From 3 changes to 2.How to fix it?
void main(void)
{
int &wtower = create_sprite(315, 106, 0, 60, 2);
sp_script(&wtower, "guardwindow");
if (&story == 1)
{
freeze(1);
say_stop("Ah finally i taught i never get out from this forest", 1);
move_stop(1, 6, 310, 1);
say_stop("`3Hey you!", &wtower);
sp_dir(1, 8);
say_stop("Who me?", 1);
say_stop("`3Yes you!Come here!", &wtower);
move_stop(1, 8, 160, 1);
say_stop("`3A!ha! just as i taught you're the one who stole my axe!", &wtower);
say_stop("Wha?", 1);
say_stop("`3Don't lie to me i know it's you!", &wtower);
say_stop("`4Rand!", &wtower);
say_stop("`3What?", &wtower);
say_stop("`4Leave him alone!He didn't stole your axe!", &wtower);
say_stop("`3Oh yes he is!", &wtower);
playsound(9,22050,0,0,0);
say_stop("`3Ow!What was that for!", &wtower);
say_stop("`4Shut your mouth about your axe or you guard at the highest tower.", &wtower);
say_stop("`4Now LEAVE HIM ALONE!", &wtower);
say_stop("`3Ok,ok", &wtower);
say_stop("`4Sorry for that traveller cause he always loves his axe.", &wtower);
say_stop("It's ok", 1);
unfreeze(1)
}
&story = 2
}
From 3 changes to 2.How to fix it?
Could you state your problem clearly? I don't get it.
1. SEMICOLONS
2. &story = 2 will always be run the way you've written this. Switch it with the curly brace above it.
2. &story = 2 will always be run the way you've written this. Switch it with the curly brace above it.
Oh yes, now I see it too. Must have missed while trying to figure out what he meant with "From 3 changes to 2.How to fix it?"
Hmm strange when i add a touch script Dink won't do anything.I'm attaching a script if i did something wrong:
void main(void)
{
sp_touch_damage(¤t_sprite, -1);
}
void touch(void)
{
say("`8Hey i said no one enters to Guard House!", &guard);
}
}
void main(void)
{
sp_touch_damage(¤t_sprite, -1);
}
void touch(void)
{
say("`8Hey i said no one enters to Guard House!", &guard);
}
}
What is &guard? Is it a global, and if so where is it referring to?
Is &guard a global variable and assigned to the guard sprite? If not, this object will not have access to the sprite you want the line to be spoken by. Also, you have a "}" too many at the end.
Try replacing the last say() line with one where Dink speaks.
If, however, the above points were already taken into account and it still doesn't work you'll have to provide us with a bit more information.
Try replacing the last say() line with one where Dink speaks.
If, however, the above points were already taken into account and it still doesn't work you'll have to provide us with a bit more information.
Ok now i have a REALLY big problem.I made this script:
void talk(void)
{
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh i'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get a elixir for me?I'll give you something.", ¤t_sprite);
say_stop("Ok i'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
}
&sseller = 1
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have a elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please i have a family and i don't want to die.", ¤t_sprite);
unfreeze(1);
}
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_item("item_ELI")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud.Now i feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3
unfreeze(1);
unfreeze(&seller);
}
and when NPC ends saying in "if(&sseller = 0)"he starts to saying on "if (&sseller == 1)"and when it ends the windows crashed!
void talk(void)
{
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh i'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get a elixir for me?I'll give you something.", ¤t_sprite);
say_stop("Ok i'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
}
&sseller = 1
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have a elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please i have a family and i don't want to die.", ¤t_sprite);
unfreeze(1);
}
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_item("item_ELI")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud.Now i feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3
unfreeze(1);
unfreeze(&seller);
}
and when NPC ends saying in "if(&sseller = 0)"he starts to saying on "if (&sseller == 1)"and when it ends the windows crashed!
There are a lot of mistakes in there, a good cleanup might be all it needs. I'd fix the brackets and other petty mistakes before even looking for other bugs.
void talk(void)
{
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
goto done;
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
goto done;
}
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3
unfreeze(1);
unfreeze(&seller);
done:
}
There you are! It should work. I also brushed up the grammar and stuff a bit too for you.
{
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
goto done;
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
goto done;
}
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3
unfreeze(1);
unfreeze(&seller);
done:
}
There you are! It should work. I also brushed up the grammar and stuff a bit too for you.
What I would do is reverse the order in which you write the script, like this:
void talk(void)
{
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3;
unfreeze(1);
unfreeze(&seller);
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
}
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
}
}
This way it won't go ahead with the part when &sseller == 1 because the &sseller == 0 part is on the end of the script. Doing goto commands can make a script very complicated to read.
void talk(void)
{
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3;
unfreeze(1);
unfreeze(&seller);
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
}
if (&sseller == 0)
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
}
}
This way it won't go ahead with the part when &sseller == 1 because the &sseller == 0 part is on the end of the script. Doing goto commands can make a script very complicated to read.
To make it shorter, you could change the if (&sseller == 0) to else. Like so:
void talk(void)
{
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3;
unfreeze(1);
unfreeze(&seller);
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
}
else
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
}
}
void talk(void)
{
if (&sseller == 2)
{
freeze(1);
say_stop("`5Here's your elixir.", 1);
kill_this_item("item_eli")
say_stop("`5*gulg*gulg*gulg*", ¤t_sprite);
int &myx = sp_x(1,-1);
int &myy = sp_y(1,-1);
&myy -= 60;
int &mcrap = create_sprite(&myx, &myy, 6, 169, 1);
sp_seq(&mcrap, 169);
sp_script(&mcrap, "shrink");
&myy -= 30;
&myx -= 30;
int &dcrap = create_sprite(&myx, &myy, 6, 169, 3);
sp_seq(&dcrap, 169);
sp_frame(&dcrap, 3);
sp_script(&dcrap, "shrink");
&myy += 10;
&myx += 60;
int &rcrap = create_sprite(&myx, &myy, 6, 169, 6);
sp_script(&rcrap, "shrink");
sp_seq(&rcrap, 169);
sp_frame(&rcrap, 6);
sp_nodraw(¤t_sprite, 1)
int &seller = create_sprite(465, 250, 16, 413, 1);
freeze(&seller)
sp_dir(1, 7)
wait(500);
say_stop("`5Whoah!Thanks bud. Now I feel better", &seller);
say_stop("`5Here's your reward", &seller);
add_item("item-sw1",438, 7);
say_stop("Thanks.", 1);
sp_script("hseller")
&sseller = 3;
unfreeze(1);
unfreeze(&seller);
}
if (&sseller == 1)
{
freeze(1);
say_stop("`5 Do you have an elixir for me?", ¤t_sprite);
say_stop("Nope.", 1);
say_stop("`5Then go...please, I have a family and I don't want to die.", ¤t_sprite);
unfreeze(1);
&sseller = 2;
}
else
{
freeze(1);
say_stop("`5Ohhh I'm so sick", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`5Yeah...I'm just so sick", ¤t_sprite);
wait(500);
say_stop("`5Could you get an elixir for me? I'll give you something.", ¤t_sprite);
say_stop("Ok I'll help you.", 1);
say_stop("`5Thank you.", ¤t_sprite);
&sseller =1;
}
}
Metatarasal, scripting the script backwards will not do anything. It's the engine. If you don't have goto blah and that, I'm pretty sure it just continues on with the rest of the script.
It's the engine.
What's the engine? I'm pretty sure that will work, just try it. I'll try to explain it, this was the old structure, with &sseller starting out as 0:
//&sseller is 0 so this will be true:
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}
//because we just set &sseller to 1 this is true too:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}
///////////////////////////////////////
This is the new structure:
//&sseller is 0 so this will be false:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}
//&sseller is 0 so this will be true
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}
As you see in the second structure only the needed part will be executed, just try it. Remember that a script is not run in a random order but from the beginning to the end.
<EDIT> Znex, your solution might be shorter but it makes it harder to read through. And is gokussj6 ever wants to extend this script further it won't work anymore...
What's the engine? I'm pretty sure that will work, just try it. I'll try to explain it, this was the old structure, with &sseller starting out as 0:
//&sseller is 0 so this will be true:
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}
//because we just set &sseller to 1 this is true too:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}
///////////////////////////////////////
This is the new structure:
//&sseller is 0 so this will be false:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}
//&sseller is 0 so this will be true
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}
As you see in the second structure only the needed part will be executed, just try it. Remember that a script is not run in a random order but from the beginning to the end.
<EDIT> Znex, your solution might be shorter but it makes it harder to read through. And is gokussj6 ever wants to extend this script further it won't work anymore...
Thanks but Znex(or metatarasal) you forgot to add unfreeze(1); also with giving elixir didn't work so i made another way to heal him(By giving for him a healing leaf from lumberjack)
OOOPS!I revealed a secret how to get a sword :X.
OOOPS!I revealed a secret how to get a sword :X.
If you reverse the order of things, it won't immediately jump to story part 2 once part 1 is done, because part 2 is defined before part 1. That's the advantage of reversing the order.
Normally there'd be an else if () for this, but I don't think Dink supports that.
Normally there'd be an else if () for this, but I don't think Dink supports that.
Ah. I didn't think reversing it would work. But now that you explained it now I know it does.
You learn something new everyday...
You learn something new everyday...
I really just wish that else if()s were included with the engine, but seeing as the whole Dink source code is a mess, that probably won't happen (unless I get good at C++ myself ).
I have a problem now when i freeze Dink and NPC then i added a move_stop blablabla and the NPC won't move!What should i do?
Really, how can we reply to it like that? Just include the code snippet when you ask something
Besides that, making a new topic for your problem is probably better.
No way!I don't want to spam the forum with all my problems.How would you feel when in one page will be all topics that i made.BTW here's the script:
void main(void)
{
int &fwall = create_sprite(103, 238, 6, 512, 1)
int &fwall2 = create_sprite(121, 217, 6, 512, 1)
int &fwall3 = create_sprite(122, 186, 6, 512, 1)
int &fwall4 = create_sprite(122, 162, 6, 512, 1)
int &fwall5 = create_sprite(98, 155, 6, 512, 1)
int &wbishop = create_sprite(294, 176, 16, 581, 1)
int &chest = create_sprite(85, 188, 0, 177, 1)
freeze(1);
freeze(&wbishop)
sp_base_walk(&wbishop, 580);
say_stop("`6Ah finally the Ancient Book will be in Seth's hand!", &wbishop);
move_stop(&wbishop, 4, 185, 0);
say_stop("`6Heh!These firewalls won't stop me!", &wbishop);
say_npc("`6Hahahahaha!, &wbishop);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(103, 238, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle2 = create_sprite(121, 217, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall2, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle3 = create_sprite(122, 186, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall3, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle4 = create_sprite(122, 162, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall4, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle5 = create_sprite(98, 155, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall5, 1);
void main(void)
{
int &fwall = create_sprite(103, 238, 6, 512, 1)
int &fwall2 = create_sprite(121, 217, 6, 512, 1)
int &fwall3 = create_sprite(122, 186, 6, 512, 1)
int &fwall4 = create_sprite(122, 162, 6, 512, 1)
int &fwall5 = create_sprite(98, 155, 6, 512, 1)
int &wbishop = create_sprite(294, 176, 16, 581, 1)
int &chest = create_sprite(85, 188, 0, 177, 1)
freeze(1);
freeze(&wbishop)
sp_base_walk(&wbishop, 580);
say_stop("`6Ah finally the Ancient Book will be in Seth's hand!", &wbishop);
move_stop(&wbishop, 4, 185, 0);
say_stop("`6Heh!These firewalls won't stop me!", &wbishop);
say_npc("`6Hahahahaha!, &wbishop);
playsound(24, 22052, 0, 0, 0);
int &circle = create_sprite(103, 238, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle2 = create_sprite(121, 217, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall2, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle3 = create_sprite(122, 186, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall3, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle4 = create_sprite(122, 162, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall4, 1);
wait(250);
playsound(24, 22052, 0, 0, 0);
int &circle5 = create_sprite(98, 155, 7, 167, 1);
sp_seq(&circle, 167);
sp_nodraw(&fwall5, 1);
Oi!I forgot about speed!dang so that's why Matridge in the intro won't move!.
So, it works now?
No way!I don't want to spam the forum with all my problems.
You're so thoughtful.
No way!I don't want to spam the forum with all my problems.
You're so thoughtful.
I prefer "Spamming" the forum with actual scripting questions over some of the other posts that pop up all over the board.
Ok i want to know how to make Dink say something if boss is killed.
You can barely let Dink say anything when an enemy's dying, because the script will be killed. Use your time efficiently and spawn() a seperate script in the die() procedure to continue the cutscene after killing the boss.
Thanx.Now i have a problem.After i setted after beating my boss i want to make Dink go near chest but Dink is on diffrent position.How can i do that?The chest is on position x = 81 y = 183.
Set dinks x with the sp_x(); command and his y with the sp_y(); command.
For example:
sp_x(1,81);
sp_y(1,183);
For example:
sp_x(1,81);
sp_y(1,183);
It would be kinda weird to just teleport him there. :/
I'd propably do something like this:
move_stop(1,4,81,1);
move_stop(1,6,81,1);
move_stop(1,2,183,1);
move_stop(1,8,183,1);
Unless I'd want him to dodge objects, at which point it gets more complicated.
I'd propably do something like this:
move_stop(1,4,81,1);
move_stop(1,6,81,1);
move_stop(1,2,183,1);
move_stop(1,8,183,1);
Unless I'd want him to dodge objects, at which point it gets more complicated.
I don't even think there is a way to make Dink dodge objects. There may be, but I don't think so. And there's something you've all been missing with your walking (teleporting in metataraslas' case.) (Heh heh). You should make Dink walk beside the chest. Not on top of it!
I don't even think there is a way to make Dink dodge objects. There may be, but I don't think so.
Well, there's no conventional way to do it (like a command), but it can be done.
And there's something you've all been missing with your walking (teleporting in metataraslas' case.) (Heh heh). You should make Dink walk beside the chest. Not on top of it!
Ha, you're right about that. But goku didn't say which way the chest it facing, so there's not much we can do about that.
Well, there's no conventional way to do it (like a command), but it can be done.
And there's something you've all been missing with your walking (teleporting in metataraslas' case.) (Heh heh). You should make Dink walk beside the chest. Not on top of it!
Ha, you're right about that. But goku didn't say which way the chest it facing, so there's not much we can do about that.
Ok now i have another problem.I made this script:
void talk(void)
{
freeze(1);
choice_start();
"Chat"
(&bbuilder == 3)"Ask about bridge"
"Nevermind"
choice_end();
if (&result == 1)
{
say_stop("`6Oh man*hic*...", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`6No but i have to tell you *hic* something in your ear", ¤t_sprite);
say_stop("Yes what is it?", 1);
wait(750);
say_stop("`6This.*hic*", ¤t_sprite);
playsound(54, 22052, 0, 0, 0);
wait(2500);
say_stop("HEY!", 1);
say_stop("`6Hahaha!*hic* OWNED!", ¤t_sprite);
unfreeze(1);
}
if (&result == 2)
{
if (&bbuilder == 3)
{
say_stop("Hey do you know how to fix the bridge?", 1);
say_stop("`6No.", ¤t_sprite);
say_stop("Too bad i must go to the Temple of the Ancients.", 1);
say_stop("`6Wait!I know how to get pass the bridge!", ¤t_sprite);
say_stop("You know?!Then tell me!", 1);
say_stop("`6Just go left from the bridge into the end*hic*.In the nearest bush there is a secret stairs and take this*hic*.", ¤t_sprite);
say_stop("Thanks!", 1);
add_magic("item-sfb", 437, 2);
say_stop("Hellfire?But i'm not powerful to do this!", 1);
say_stop("`6Hey *hic* i don't have any weak magics for you *hic* you have to use this now *hic*", ¤t_sprite);
wait(500);
say_stop("`6Anyway *hic* there are some strange glowing monsters.", ¤t_sprite);
say_stop("`6Er...", ¤t_sprite);
playsound(55, 22052, 0, 0, 0);
wait(250);
int &barf = create_sprite(361, 136, 7, 941, 1);
sp_seq(&barf, 941);
unfreeze(1);
say("`6*barf*", ¤t_sprite);
}
&bbuilder = 4;
}
if (&result == 3)
{
unfreeze(1);
}
}
And when i talk to him about bridge and when Dink say's "You know!Then tell me!" the computer crashed!
void talk(void)
{
freeze(1);
choice_start();
"Chat"
(&bbuilder == 3)"Ask about bridge"
"Nevermind"
choice_end();
if (&result == 1)
{
say_stop("`6Oh man*hic*...", ¤t_sprite);
say_stop("Hey are you ok?", 1);
say_stop("`6No but i have to tell you *hic* something in your ear", ¤t_sprite);
say_stop("Yes what is it?", 1);
wait(750);
say_stop("`6This.*hic*", ¤t_sprite);
playsound(54, 22052, 0, 0, 0);
wait(2500);
say_stop("HEY!", 1);
say_stop("`6Hahaha!*hic* OWNED!", ¤t_sprite);
unfreeze(1);
}
if (&result == 2)
{
if (&bbuilder == 3)
{
say_stop("Hey do you know how to fix the bridge?", 1);
say_stop("`6No.", ¤t_sprite);
say_stop("Too bad i must go to the Temple of the Ancients.", 1);
say_stop("`6Wait!I know how to get pass the bridge!", ¤t_sprite);
say_stop("You know?!Then tell me!", 1);
say_stop("`6Just go left from the bridge into the end*hic*.In the nearest bush there is a secret stairs and take this*hic*.", ¤t_sprite);
say_stop("Thanks!", 1);
add_magic("item-sfb", 437, 2);
say_stop("Hellfire?But i'm not powerful to do this!", 1);
say_stop("`6Hey *hic* i don't have any weak magics for you *hic* you have to use this now *hic*", ¤t_sprite);
wait(500);
say_stop("`6Anyway *hic* there are some strange glowing monsters.", ¤t_sprite);
say_stop("`6Er...", ¤t_sprite);
playsound(55, 22052, 0, 0, 0);
wait(250);
int &barf = create_sprite(361, 136, 7, 941, 1);
sp_seq(&barf, 941);
unfreeze(1);
say("`6*barf*", ¤t_sprite);
}
&bbuilder = 4;
}
if (&result == 3)
{
unfreeze(1);
}
}
And when i talk to him about bridge and when Dink say's "You know!Then tell me!" the computer crashed!
"Just go left from the bridge into the end*hic*.In the nearest bush there is a secret stairs and take this*hic*." is too long for one say_stop. His next line possibly as well.
I don't think that's it. Might be, but I don't think so. Just get rid of the:
if (&bbuilder == 3)
etc.
You don't need it because that will only show up if &bbuilder equals 3. So if it doesn't equal 3 then it won't show up so there's no point. It's probably not it, but it's worth a try.
if (&bbuilder == 3)
etc.
You don't need it because that will only show up if &bbuilder equals 3. So if it doesn't equal 3 then it won't show up so there's no point. It's probably not it, but it's worth a try.