The Dink Network

Screenlock?! No!

February 25th 2006, 03:48 PM
slayer.gif
Ok. I tried to make a D-Mod. I learnt the programming fast. I tested my unfinished D-Mod.
It worked brilliantly but I couldn't walk from a screen to another. Does anybody know how to unlock it?
February 25th 2006, 03:50 PM
pq_knight.gif
and1
Peasant He/Him
 
dinkc references thats only i gonna say
(tehniques part)
February 25th 2006, 03:53 PM
slayer.gif
Dinkc? Oh dang, could anybody please tell me a certain script I need?
February 25th 2006, 03:54 PM
pq_knight.gif
and1
Peasant He/Him
 
// scrnlk1.c

void main(void)

{

// Make this sprite invisible

sp_nodraw(&current_sprite,1);



// Screenlock the screen

screenlock(1);



// Loop forever, until there aren't any sprites with brains 9 and 10 on the screen

loop:

wait(250);

if (get_sprite_with_this_brain(9, 0) == 0)

{

if (get_sprite_with_this_brain(10, 0) == 0)

{

// Remove the screenlock

screenlock(0);

playsound(43, 22050,0,0,0);



// Kill this sprite forever, so there aren't any more screenlocks!

int &editor_sprite = sp_editor_num(&current_sprite);

if (&editor_sprite != 0)

{

editor_type(&editor_sprite, 1);

}

kill_this_task();

}

}

goto loop;

}
February 25th 2006, 04:10 PM
slayer.gif
Thanks. I hope it works.
February 25th 2006, 04:19 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
You need to set the &player_map variable in start-1.c to a valid screen number, I think.
February 25th 2006, 04:38 PM
slayer.gif
Oh, by the way. Start- 1 C file appears to me as a D- file, if I try to open it as a C- file, I see "a bunch of junk I cannot understand". There's no sp_x in it.
February 25th 2006, 04:42 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Ah, fetch the start-1.c from the original game (the .c source is included in %insert_dink_install_dir_here%/develop/source.zip).
February 25th 2006, 04:50 PM
slayer.gif
You are truly talking about something I cannot understand. What CD? I don't need a CD to play. And also, I did "fetch the start-1.c from the original game", but the thing remains the same.
February 25th 2006, 04:58 PM
pq_knight.gif
and1
Peasant He/Him
 
MY LAST TRY
first go to defelop folder in Dink Smalwood folder adn while you are in develop folder go in DinkC references(its like manual) then go into Tehniques chapter screen lock and read it carefuly. Then try it.If it dosnt word do wat redink says.Go iinto you dmod folder/story/start-1.c it must be there then change in what you need and try it.
February 25th 2006, 05:09 PM
slayer.gif
The DinkC techniques chapter didn't seem to contain anything useful to me. I went to the editor and pressed B as told.
February 25th 2006, 05:09 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Say you have installed Dink into

C:\program files\dink smallwood\

Then there will be a folder called

C:\program files\dink smallwood\develop

In it, there's a file called "source.zip". Open it up (with winzip or other), and look for start-1.c. Unzip it into your D-Mods story dir (for example C:\program files\dink smallwood\d-mod\story)

If you have installed Dink somewhere else, replace "C:\program files\dink smallwood" with the directory you installed it to.
February 25th 2006, 05:19 PM
slayer.gif
Brilliant! The first thing I was able to understand! It works now... hopefully.
February 26th 2006, 05:36 AM
slayer.gif
Er... And1's 2nd post. In the start-1.c file, there were no such sprites... could you please explain that one?
February 26th 2006, 05:43 AM
duckdie.gif
Does anybody know how to unlock it?

I had this problem a long time ago...
I think I used
load_screen();
draw_background();
draw_hard_map();
draw_screen();

And poof, it worked. I think load_screen() may be enough to get rid of your problem.
February 26th 2006, 07:06 AM
slayer.gif
dang. Anything that would work is something I cannot understand. If someone only could send the correct start-1.c file to me by an e-mail, many things were clearlier... but I guess, that won't happen.
February 26th 2006, 07:10 AM
pq_knight.gif
and1
Peasant He/Him
 
start-1.c

//start
void buttonon( void )
{
sp_pframe(&current_sprite, 2);
Playsound(20,22050,0,0,0);
}

void buttonoff( void )
{
sp_pframe(&current_sprite, 1);
Playsound(21,22050,0,0,0);
}

void click ( void )
{
Say_xy("`%Please wait. (Creating new game)", 0, 394);
wait(1);

//"turns game on"
set_mode(2);
reset_timer();
fill_screen(0);
//put dink in this room
&player_map = 32;

//make dink
sp_x(1, 180);
sp_y(1, 250);
sp_base_walk(1, 70);
sp_base_attack(1, 100);
sp_dir(1, 8);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);

//dinks weapons
add_item("item-fst",438, 1);
&cur_weapon = 1;
arm_weapon();

//status bar
&update_status = 1;
draw_status();

kill_this_task();
}

Maby this will help
February 26th 2006, 07:16 AM
slayer.gif
There's no way I could understand that, it doesn't seem to have anything to do with the screenlock either. So read my previous message please?
February 26th 2006, 07:19 AM
pq_knight.gif
and1
Peasant He/Him
 
You need corect start-1.c?
February 26th 2006, 07:23 AM
slayer.gif
You guys learn fast.
February 26th 2006, 07:26 AM
pq_knight.gif
and1
Peasant He/Him
 
Make notpad file type start-1.c as name and paste crap i posted earlier in it and that's you working start-1.c
February 26th 2006, 07:32 AM
slayer.gif
It does not work... boohoo...
February 26th 2006, 07:35 AM
pq_knight.gif
and1
Peasant He/Him
 
Hmmm i think i had same problem.I coudnt moved from start screen.
February 26th 2006, 07:39 AM
slayer.gif
Ok. Does anybody know how to remove this problem, and how to explain it like so I can understand it?
February 26th 2006, 07:41 AM
pq_knight.gif
and1
Peasant He/Him
 
Maby someone better than me.Maby redink1 or simonk i dunno
February 26th 2006, 07:45 AM
duckdie.gif
I had this problem a long time ago...
I think I used
load_screen();
draw_background();
draw_hard_map();
draw_screen();

And poof, it worked. I think load_screen() may be enough to get rid of your problem.


Add my lines after loading the screen with &player_map and load_map([map number]) in start-1.c
February 26th 2006, 08:26 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
1) This is not a screenlock issue.

2) This problem occurs if Dink is placed in a screen that does not exist. The game will try to load the nearest map screen, but because no other screens are are around the screen that doesn't exist, Dink can't walk off of it.

So... open your map file. Write down the number of the screen you'd like Dink to start in. Then, open start-1.c, and look for something like this:

&player_map = 32;

Change the 32 to the number you wrote down earlier.
February 26th 2006, 08:50 AM
slayer.gif
I have tried all ways you have told me, but none has worked. Could the fact that I cannot see an interface (strength, health etc.) help?
February 26th 2006, 09:56 AM
duckdie.gif
If you can send me your D-Mod, I'll see what I can do (it shouldn't be too big, you've just started it).
February 26th 2006, 03:10 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Check the start-1.c If you have there
sp_map(1, xx);
replace it with
&player_map = xx;
February 26th 2006, 03:20 PM
slayer.gif
Again, nothing happened.
February 26th 2006, 03:27 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Ok, this made me curious. Send your DMOD here.
February 26th 2006, 03:35 PM
slayer.gif
D-Mod sent.
February 26th 2006, 03:49 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Ok. Problem solved:
1. Your script was named start-1.c.c.c That's way the game didn't called it.
2. I changed a few lines of it:
Here's the new one:

//start
void buttonon( void )
{
sp_pframe(&current_sprite, 2);
Playsound(20,22050,0,0,0);
}

void buttonoff( void )
{
sp_pframe(&current_sprite, 1);
Playsound(21,22050,0,0,0);
}

void click ( void )
{
Say_xy("`%Please wait. (Creating new game)", 0, 394);
wait(1);

//"turns game on"
set_mode(2);
reset_timer();
fill_screen(0);
//put dink in this room
&player_map = 374;
load_screen();

//make dink
sp_x(1, 180);
//&player_map=374;
sp_y(1, 250);
sp_base_walk(1, 70);
sp_base_attack(1, 100);
sp_dir(1, 8);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);

//dinks weapons
add_item("item-fst",438, 1);
&cur_weapon = 1;
arm_weapon();

//status bar
&update_status = 1;
draw_status();

kill_this_task();
}
February 26th 2006, 03:51 PM
duckdie.gif
I told him something similar last time, but I'll doubt he'll really be able to fix the problem until he finds a way to use the right file extension.

EDIT : Yeah, looks like he's adding a '.c' every time he sends a new version. So now the file is 'start-1.c.c.c'. This is getting worse.