The Dink Network

what

March 20th 2004, 05:08 AM
spike.gif
the hell is wrong with this script? It doesn't work. When Dink touches the hole, nothing happens. I switched places with this and another absolutely similar (except for the coordinates) script, and it worked. but this one doesn't. What's wrong?

void main( void )
{
preload_seq(452);
sp_touch_damage(&current_sprite, -1);
sp_que(&current_sprite, 1);
}
void touch( void )
{
if (&life < 1) return;
freeze(1);
sp_x(1, 410);
sp_y(1, 390);
sp_seq(1, 452);
sp_frame(1, 1);
sp_nocontrol(1, 1);
sp_touch_damage(&current_sprite, 0);
sp_brain(1, 0);
wait(2000);
sp_brain(1, 1);
&player_map = 297;
sp_x(1, 490);
sp_y(1, 100);
load_screen();
draw_screen();
}
March 20th 2004, 07:06 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Put a script_attach(1000) between the sp_brain(); and the &player_map:

sp_brain(1, 1);
script_attach(1000);
&player_map = 297;

oh, and the return after the if (&life < 1) shoud be on a new line.
March 20th 2004, 07:08 AM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
only thing i can think of is try

sp_touch_damage(&current_sprite,0);
wait(10);
whatever else
March 20th 2004, 07:09 AM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
oh yeah, when you change screens, normal scripts die. attaching the script to 1000 is like a spawn, that survives screen change. but then you have to get rid of it too.
March 20th 2004, 08:01 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
kill_this_task();

March 21st 2004, 02:19 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Any reason for no fade_down()'s ?
March 21st 2004, 02:04 PM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
they look funky with screen changes. like it fades down, then goes away for a split second when it changes map or something weird like that. if you look in anarchy halloween party, i actually made a black sprite stretch and cover the screen to prevent that.
March 21st 2004, 02:50 PM
spike.gif
I don't use screen fades nowadays. Everything looks much cooler without them.

Anyway, I got the script to work. I don't know what was the problem, but I just screwed around with my dmod long enough and it started working. Yay.