The Dink Network

Screenlock Status Bars

November 4th 2007, 08:00 PM
knights.gif
Is there a way you can make the status bar have a screenlock animation as well as the sidebars?
November 4th 2007, 09:33 PM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
by utilising the power of dinkc

i guess it is possible, but not exactly with the screenlock bars themselves. it requires another animation that exists on every single screen (don't go into the editor to do this, i will tell you how later)

to get started, make an animation the same dimensions as the screenlock status bars. then, you have to put them in the graphics folder and/or any subdirectory (it doesn't have to be in the graphics folder, although most graphics are) and then you have to edit the dink.ini file.

place the lines in dink.ini so that the animation works, for more information on this consult the dink help file. now that you have the graphics set up, it is now time to put them into your dmod

now you need a script to place them on every screen with a screenlock. when the screenlock dissapears, then we need to destroy or kill the graphics. to do this, we will start off with a simple script to make the screen lock:

void main (void)
{
if (&story == 2)
{
screenlock(1);
spawn(name of animation controller script-it doesn't exist yet, so just make up a name);
}

now we need the controller script.

void main (void)
{

loop:
int &bar_anim
//no i havn't tested this, but i'm assuming it works
&screenlock = screenlock();
if (&screenlock == 0)
{
editor_sprite(blahblahblah i can't remember what to do here, just make the dang thing DIE!);
kill_this_task();
}
else
{
&bar_anim = create_sprite(now for the attributes of the animation, such as x and y cordinates, and the brain etc.)
sp_noclip(1);
}
wait(200);
goto loop;
}

of course this script was not tested and there is still a lot of work for you to do, but i hope this helped you
November 4th 2007, 09:35 PM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
as for the normal sidebars, that is probably possible, but i do not want to go there, since this will freeze the game when you load a savegame with the script enabled. so i would stick with the screenlocks, since they should be okay
November 4th 2007, 10:51 PM
spike.gif
I think he simply wishes the status bar to look locked too, not have some kind of a moving animation on them all.

It would propably be simplest to init(); the new graphics in when screenlock is turned on and init(); the old graphics back when it's turned off.

screenlock(1);
init("load_sequence graphics\newstatusyay blah blah blah");

screenlock(0);
init("load_sequence graphics\oldstatus blah blah blah");
November 5th 2007, 12:14 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
You probably have to fire off a draw_status(); (I think) after that, though.