Screenlock?! No!
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?
It worked brilliantly but I couldn't walk from a screen to another. Does anybody know how to unlock it?
Dinkc? Oh dang, could anybody please tell me a certain script I need?
// scrnlk1.c
void main(void)
{
// Make this sprite invisible
sp_nodraw(¤t_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(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
}
goto loop;
}
void main(void)
{
// Make this sprite invisible
sp_nodraw(¤t_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(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
}
goto loop;
}
You need to set the &player_map variable in start-1.c to a valid screen number, I think.
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.
Ah, fetch the start-1.c from the original game (the .c source is included in %insert_dink_install_dir_here%/develop/source.zip).
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.
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.
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.
The DinkC techniques chapter didn't seem to contain anything useful to me. I went to the editor and pressed B as told.
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.
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.
Brilliant! The first thing I was able to understand! It works now... hopefully.
Er... And1's 2nd post. In the start-1.c file, there were no such sprites... could you please explain that one?
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.
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.
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.
start-1.c
//start
void buttonon( void )
{
sp_pframe(¤t_sprite, 2);
Playsound(20,22050,0,0,0);
}
void buttonoff( void )
{
sp_pframe(¤t_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
//start
void buttonon( void )
{
sp_pframe(¤t_sprite, 2);
Playsound(20,22050,0,0,0);
}
void buttonoff( void )
{
sp_pframe(¤t_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
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?
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
Hmmm i think i had same problem.I coudnt moved from start screen.
Ok. Does anybody know how to remove this problem, and how to explain it like so I can understand 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.
Add my lines after loading the screen with &player_map and load_map([map number]) in start-1.c
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
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.
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.
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?
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).
Check the start-1.c If you have there
sp_map(1, xx);
replace it with
&player_map = xx;
sp_map(1, xx);
replace it with
&player_map = xx;
Ok, this made me curious. Send your DMOD here.
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(¤t_sprite, 2);
Playsound(20,22050,0,0,0);
}
void buttonoff( void )
{
sp_pframe(¤t_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();
}
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(¤t_sprite, 2);
Playsound(20,22050,0,0,0);
}
void buttonoff( void )
{
sp_pframe(¤t_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();
}
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.
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.