The Dink Network

Reply to Re: Why Can't I Quit You, DinkC?

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 7th 2014, 06:37 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
How do you feel about ugly hacks? (Which are untested, this post is just hypothesis)

// credits.c
void main( void )
{
  int &lock = spawn("lock");
  say_xy("Credits here!",200,500);
  wait(10000);
  stop_wait_for_button();
  run_script_by_number(&lock,"close");
}


// lock.c
void main( void )
{
creditloop:
  wait_for_button();
  goto creditloop;
}

void close( void )
{
  kill_this_task();
}


Ideally, you'd put the stop_wait_for_button() inside the close() proc of lock.c as well, but dinkc.chm says that it'll behave as if the script that originally caled wait_for_button() will react as if it just encountered a return. This may mean that the kill_this_task() is not run. Not that that matters much, you'd just end up with a ghost script in memory, taking up a script slot. It should be gone as soon as you load a game.