Player map not changing
I want to make a script make Dink go to another screen, but it ain't workin'. The screen fades down and up and he's still on the same screen. Here's the script, with dialogue taken out

void main(void) { fade_down(); freeze(1); sp_dir(1, 8); wait(1000); say_stop_xy("`%", 0, 200); say_stop_xy("`%", 0, 200); fade_up(); say_stop("?!", 1); wait(400); say_stop("`5!", ¤t_sprite); wait(250); say_stop("!", 1); sp_seq (1, 108); sp_frame(1, 2); sp_kill_wait(1); sp_nocontrol(1, 1) wait(25); playsound(9, 22050, 0, 0, 0); say_stop("`5", ¤t_sprite); wait(250); say_stop("!", 1); sp_seq(1, 108); sp_frame(1, 1); sp_kill_wait(1); sp_nocontrol(1, 1)l wait(25) playsound(9, 22050, 0, 0, 0); wait(40); sp_seq(1, 108); sp_frame(1, 1); sp_kill_wait(1); sp_nocontrol(1,1); wait(25) playsound(9, 22050, 0, 0, 0); sp_seq(¤t_sprite, 765); sp_frame(¤t_sprite,1); wait(500); say_stop(".", 1); wait(250); say_stop("?", 1); wait(200); sp_dir(1, 6); wait(600); sp_dir(1, 2); wait(900); sp_dir(1, 8); say_stop("!", 1); wait(200); move_stop(1, 4, 139, 1); say_stop("`5.", 1); wait(500); sp_dir(1, 6); say_stop("?", 1); wait(250); say_stop("`5.", 1); wait(250); sp_dir(1, 2); say_stop("?", 1); say_stop("`5.", 1); wait(250); sp_dir(1, 6); wait(500); say_stop("`5.", 1); say_stop("`5.", 1); say_stop("`5.", 1); wait(500); say_stop("?", 1); wait(280); sp_dir(1, 2); wait(500); say_stop(".", 1); say_stop(".", 1); &story == 0; fade_down(); &player_map = 582; fade_up(); &update_status = 1; draw_status(); unfreeze(1); }
It works now (copied some lines from Smallwood-man, thanks Skorny), but there are two scripts for barriers that are not.
Dink acts like those barriers aren't there.
void touch(void) { if(&story == 1); { freeze(1); move_stop(1, 2, 200, 1); say("I don't wanna go there", 1); unfreeze(1); return; } }
Dink acts like those barriers aren't there.
void touch(void) { freeze(1); move_stop(1, 8, 200, 1); say("Don't wander!", 1); unfreeze(1); return; }
nsgate script - attatch to a barrier you dont want him to pass
Change this - ¤t_sprite- to ¤t_sprite it messes up when i past stuff in there grrrrr
void main(void) { if (&story < 1) { sp_nodraw(¤t_sprite, 0); sp_touch_damage(¤t_sprite, -1); } if (&story >= 2) { sp_nodraw(¤t_sprite, 1); sp_hard(¤t_sprite, 1); draw_hard_sprite(¤t_sprite); } } void touch(void) { if(&story < 2) { say("I can't get past.", 1); move_stop(1, 8, 64, 1); freeze(1); unfreeze(1); }
Change this - ¤t_sprite- to ¤t_sprite it messes up when i past stuff in there grrrrr
This is probably due to the engine not checking for touch with this sprite.
To solve it give the sprite a touch damage of -1 in the main procedure.
sample code (not tested, and haven't programmed in dinkC for ages)
Msdink was faster, but she forgot something important, always disable touch in the beginning of touch procedure. Or bad things can happen!
To solve it give the sprite a touch damage of -1 in the main procedure.
sample code (not tested, and haven't programmed in dinkC for ages)
void main(void) { sp_touch_damage(¤t_sprite, -1); } void touch(void) { sp_touch_damage(¤t_sprite, 0); //we don't want it to run this again freeze(1); int &xchange = sp_x(1, -1); //checking for dinks location &xchange += 50; //increesing the x value by 50, foir moving right later move_stop(1, 8, &xchange, 1); //moving right to xchange. 50 pixels right of dink unfreeze(1); sp_touch_damage(¤t_sprite, -1); //Now we enable touch again }
Msdink was faster, but she forgot something important, always disable touch in the beginning of touch procedure. Or bad things can happen!

No dice D:
changed a line to this:
but still nothin
Gonna test ipd's method
changed a line to this:
if (&story < 2)
but still nothin
Gonna test ipd's method
Have you asigned the script to a sprite?
Oh and also it can't be invisible, then it doesn't work.
Instead make it a normal sprite in the editor and put this in the main procedure instead, as msdink suggested (But I forgot, sorry).
And if you want him to pass later just give him a touch damgage of 0 when a global has a certain value.

Oh and also it can't be invisible, then it doesn't work.
Instead make it a normal sprite in the editor and put this in the main procedure instead, as msdink suggested (But I forgot, sorry).
void main(void) { sp_touch_damage(¤t_sprite, -1); sp_nodraw(¤t_sprite, 1); }
And if you want him to pass later just give him a touch damgage of 0 when a global has a certain value.
Yes. It was invisible OK, I'll check the nodraw method.
Also:
Do Story variables need to be inted? Just a suspicion. Or are they already inted?
like int &story;
Kill_this_task isn't working. When I come back in the screen the script will repeat
WIsh me luck with this DMOD
Also:
Do Story variables need to be inted? Just a suspicion. Or are they already inted?
like int &story;
Kill_this_task isn't working. When I come back in the screen the script will repeat

void main(void); { if(&story == 0) { freeze(1); fade_up(); wait(500); say_stop("bla bla bla!.", 1); say_stop("bla", 1); wait(250); say_stop("`5bla bla bla!?", 1); wait(250); say_stop("bla bla.... bla bla, bla bla bla", 1); &story == 1; &update_status = 1; draw_status(); unfreeze(1); kill_this_task(); } }
WIsh me luck with this DMOD

&story == 1
This does not work, it needs to be a single "=".
And good luck! I love seeing you work on this. We'll always be here to help.
This does not work, it needs to be a single "=".
And good luck! I love seeing you work on this. We'll always be here to help.
The single "=" stand for assigning a value to a variable. The double "==" is used to check its value in conditional statements. That's why you do need double "=" in if statements

Get in here! Finally both the barrier and the story variables are working properly! Thanks!
Did 2 screens in 2 days.... Hmmm...
A screen a day keeps the bad scores at bay. Yes, that's my new DMODing motto!
Did 2 screens in 2 days.... Hmmm...
A screen a day keeps the bad scores at bay. Yes, that's my new DMODing motto!

I rather like your approach to making dmods DD - doing the mapping and scripting per screen - thats a great way to do it so when you are really done - its actually totally finished - wow thats so cool
