Prowler Productions
  Dink Smallwood Forum
  Making status screens

Post New Topic  
profile | register | faq

Author Topic:   Making status screens
FF4LIFE posted 12-03- 08:00 PM CT (US)   Click Here to See the Profile for FF4LIFE   Click Here to Email FF4LIFE  
I just would like help on something. I'm attempting to make a status screen, so it shows a bitmap, and depending on what you've got shows little sprites in certain places. I've sort of got it working, but I need to know a few things:
1) How do you make it so you can't do anythng EXCEPT hit the 'S' key again, and how to make the 'S' key kill everything.
2) How do you make the 'box' in the enter screen that you use to select what item you use?
3) Then how do you make it so if you select a certain thing, stuff happens

Yeah, basicly i just want it to stop the game, and show you the screen for one, with all the stuff you've collected in its designated spots, then you hit the key again and it goes away.

Then the other one I want it to show the bitmap or whatever, and if you have things, they'll be in their designated spots, but now you can highlight and click on the ones you've got.

I don't know if anyones done anything like this, or if its possible, or if anyone caught one damn thing i just said, but any help would be appreciated :)

-FF4LIFE

someone2 posted 12-03- 11:27 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
1) How do you make it so you can't do anythng EXCEPT hit the 'S' key again, and how to make the 'S' key kill everything.

wfb:
wait_for_button();
if (&result <> 83)
goto wfb;

// note: I'm not sure if Dink will do this properly, as I am unsure on whether &result will show the real value.

// a different way to do is to set button 8 (see escape.c) to S, then check if &result <> 8.

To kill everything on the screen.. how? A missile will be easy (set its range to 600). Otherwise:

int &g;
loopz:
&g = get_rand_sprite_with_this_brain(9,1);
if (&g <> 0)
{
sp_kill(&g);
goto loopz;
}

2) How do you make the 'box' in the enter screen that you use to select what item you use?
3) Then how do you make it so if you select a certain thing, stuff happens

This is complex, and I'm not going to write it for you. It is possible, though. I don't know how to change the box on the ENTER screen, but you can create your own and bind it to another key (like I).

Techniques useful for this:
-wait_for_button() to get the arrows and ctrl, and update the position.
-I think it was Simon (or Paul?) who posted a while ago how to get a heap of variables out of one int, if they're all 1 or 2 (something like this):

int &test = 110;
int &last = &test;
&last / 100;

int &second = &test;
int &temp = &last;
&temp * 100;
&second -= &temp;
int &first = &second;
&second / 10;

// we already have &first, = 10
&temp = &second;
&temp * 10;
&first -= &temp;

That way, &test could be, say 11001, which might mean they have the first two items, but not the second. Also, because you will just be using 1s and 0s, you don't have to worry about rounding up.

someone2 posted 12-03- 11:31 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
Oh, and a better way to stop the game 'til S may be:

{
freeze(1);
&gvar = 14;
// &gvar is a global var
}

then in key-83.c:

main(void)
{
if (&gvar == 14)
spawn("s14cont");
kill_this_task();
}

and s14cont.c has what you want to happen after S, including upping the story var.

FF4LIFE posted 12-04- 04:07 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Ok, thanks, i'll see how much of that i can infact do.
FF4LIFE posted 12-05- 07:24 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
By the way, what is the ( <> ) that you do? What does it mean? Less than and greater than?
someone2 posted 12-05- 11:41 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
Oops :)

Replace all <> with !=. (<> is Delpi for != :).

someone2 posted 12-07- 10:49 PM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
SoB has something similar to what you want, for the 'riddle of the purple pear'. See if you can get the source for that off Simon. (I think simonk@australiamail.com .)

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.