Prowler Productions
  Dink Smallwood Forum
  Freeze and Unfreeze are a breeze

Post New Topic  
profile | register | faq

Author Topic:   Freeze and Unfreeze are a breeze
bdjnk posted 01-19- 05:52 PM CT (US)   Click Here to See the Profile for bdjnk   Click Here to Email bdjnk  
void talk( void)
{
int &girl;
freeze(1);
(unimportent talking)
{
(unimportent talking)
{
(unimportent talking)
&girl = create_sprite(368, 342, 0, 0, 0);
sp_brain(&girl, 6);
sp_speed(&girl, 1);
sp_timing(&girl, 0);
//set starting pic
sp_pseq(&girl, 251);
sp_script(&girl, "s1-girl");
}
}
unfreeze(1);
}

this creates a sprite girl and makes that sprite run the following script:

void main( void )
{
freeze(1);
(lots of unimportent talking)
unfreeze(1);
(some more unimportent talking)
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}

there is only one problem with these two scripts is that once the second script starts to run, dink becomes unfrozen.

I have no idea why this would happen, so maybe someone with more expireince then me can see something that would make dink unfreeze once the second script started to run.

someone2 posted 01-20- 03:10 AM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
Simple: just think like a computer!

When it executes the sp_script(&girl,"s1-girl"); the CPU then goes off and executes the main(void) function in s1-girl.c. Because of threads the result may differ with different computers..

Maybe change the unfreeze(1) to:

if (&girl == 0)
unfreeze(1);

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.