Frictional Games Forum (read-only)

Full Version: Script after note is read?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way to execute a script after a note has been closed?
Yes. When you click the entity there's something named CallbackFunc. In there write the name of the function you want to execute.

In the script you write this.

Code:
void NameOfFunction(string &in asEntity, string &in asType)
{
     //Stuff to happen
}
(10-02-2014, 01:50 PM)Neelke Wrote: [ -> ]Yes. When you click the entity there's something named CallbackFunc. In there write the name of the function you want to execute.

In the script you write this.

Code:
void NameOfFunction(string &in asEntity, string &in asType)
{
     //Stuff to happen
}

I thought of that, but will the script be put on hold until the note is closed? Or will it happen while the note is being read?
After it has been read.
It actually happens AS you pick it up. If you for example play a sound effect, it will play instantly, even while the note is open.

Here's a trick: Timers freeze during notes. If you add a timer of just 0.001, it will freeze and not continue before the note has been closed.
(10-02-2014, 03:48 PM)Mudbill Wrote: [ -> ]It actually happens AS you pick it up. If you for example play a sound effect, it will play instantly, even while the note is open.

Here's a trick: Timers freeze during notes. If you add a timer of just 0.001, it will freeze and not continue before the note has been closed.

Awesome, thanks.