Prowler Productions
  Dink Smallwood Forum
  Can someone check this.

Post New Topic  
profile | register | faq

Author Topic:   Can someone check this.
Zail posted 11-22- 10:14 PM CT (US)   Click Here to See the Profile for Zail   Click Here to Email Zail  
I'm trying to make a sprite talk in a nonstandard way. I want the words to appear a little to the left and a little to the right of the sprite. I wrote up this script and I've been trying to make it work for a couple of days now (off and on). Does anyone see anything wrong with it. It places the text in question at the top center of the screen. I only see the "Thunder" part of it.

int &mholdx = sp_x(1, -1);
int &mholdx1 = &mholdx + 15;
int &mholdx2 = &mholdx - 15;
int &mholdy = sp_y(1, -1);
say_stop_xy"`7 Thunder!", &mholdx2, &mholdy);
wait(300);
say_stop_xy("`7 Lightning!", &mholdx1, &mholdy);
wait(300);
say_stop("`7 Don't get caught in the storm!", ¤t_sprite);

Nexis posted 11-22- 10:34 PM CT (US)     Click Here to See the Profile for Nexis  Click Here to Email Nexis     
Well that's actually an easy one to answer. It's because of a bug in the dink smallwood engine.

Basically when you try to access the variable &mholdx1 you are actually getting the variable &mholdx because the dink engine doesn't check every character of a variable name. It only checks each character until it finds a variable that matches an existing variable.

So instead of using &mholdx use something like &mholdx0 instead.

someone2 posted 11-22- 11:33 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
No, that might be a bug, but there's also another one (which will take affect with your's).

Dink checks the first four letters, so you need to make sure you have no variables with the first four letters the same.

So:
&1mholdx
&2mholdx

etc.

Zail posted 11-24- 06:42 PM CT (US)     Click Here to See the Profile for Zail  Click Here to Email Zail     
Hmm... I made some changes but they are not working properly yet. Everything works well but the words "thunder!" and "lightning!" seem to randomly center themselves around a point. This point is never the sprite (frozen with a type 16 brain) I have this attached to. Could you have another look at it.

int &mh0 = sp_x(¤t_sprite, -1);
int &mh1 = &mh0;
&mh1 += 25;
&mh0 -= 25;
int &mhy = sp_y(¤t_sprite, -1);
&mhy -= 15
say_stop_xy("`7 Thunder!", &mh0, &mhy);
wait(300);
say_stop_xy("`7 Lightning!", &mh1, &mhy);
wait(300);
say_stop("`7 Don't get caught in the storm!", ¤t_sprite);

I'm thinking about using spaces to offcenter the words instead of using this script. That or cutting it and replacing it with something else.

someone2 posted 11-24- 07:12 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
That's another 'feature' in Dink :).

When you use say_stop_xy, Dink adds 300 to the Y. So if you type say_stop_xy("",50,50); it will display the text at 50,350. So you should just add a &mhy -= 300; and it will work properly (yes, Dink supports negative values).

someone2 posted 11-25- 11:46 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
No wait... not the Y, the X.

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.