The Dink Network

Help please

November 29th 2004, 12:31 AM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
My script freezes my game.Why?

//The main function
void main( void )
{
//Make it so the sprite can be touched
sp_touch_damage(&current_sprite, -1);
}

//The touch function
void touch( void )
{
//Make it so the sprite isn't touched more than once...
sp_touch_damage(&current_sprite,0);
if (&story < 4)
{
Say("I think I'd better look around some more first!", 1);
freeze(1);
move_stop(1, 2, 200, 1);
unfreeze(1);
//Make it so we can touch it again
sp_touch_damage(&current_sprite,-1);
}
if (&story > 3)
{
freeze(1);
sp_x(1, 261);
sp_y(1, 261);
sp_seq(1, 452);
sp_frame(1, 1);
sp_nocontrol(1, 1); //dink can't move until anim is done!
sp_touch_damage(&current_sprite, 0);
sp_brain(1, 0);
wait(2000);
sp_brain(1, 1);
&player_map = 340;
sp_x(1, 261);
sp_y(1, 377);
load_screen(340);
draw_screen();
}
}
November 29th 2004, 12:52 AM
wizardb.gif
Merlin
Peasant He/Him
 
Try unfreeze(1) at the end of your second loop there.
November 29th 2004, 01:51 PM
anon.gif
MiloBones
Ghost They/Them
 
Merlin's advice seems on the money, but I'm slightly anal about this: I always use spawn() to do warps, which neccesitates an sp_active(&current_sprite, 0); in the touched-thing's script (not such a bad idea in any case...)
November 29th 2004, 02:23 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Spawn()? Eww... why make a warp more complicated?
November 29th 2004, 10:31 PM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
I put the unfreeze in and my screen still locked right after dink says 'I should look around..blah blah' .I'm thinking I might just scrap this script and do something a little different anyways.But thanks Merlin,your advice is muchly appreciated.
November 29th 2004, 10:51 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Try using say_stop() so the script waits until he's done speaking.
Have you tried debug mode?(alt-D) What are the last few lines in the debug.txt it writes while playing that?
November 30th 2004, 12:00 AM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
Okay,tried the stop thing...still froze up.
With debug mode on...the last line I saw
was..
Dink:if returned false,skipping next thing

Does that make any sense?
You should have seen how bad this script was before redink1 tried to help me...I think he may have laughed,it was that bad.
November 30th 2004, 08:07 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
"Dink:if returned false,skipping next thing"
probably &story was not > 3 so the last if (if (&story > 3) skipped. Sounds normal.
Screen 340 does exist right? -nevermind, it got skipped.
This sript seem ok, what other scripts are running?
December 1st 2004, 03:09 AM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
I got a couple tree scripts on that screen,but thats about it.And yeah,screen 340 is where the hole is supposed to warp you to.Meanwhile,I'm off to try and fix a few other scripts I managed to wreck.*sigh*