Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script after note is read?
Spazatron Offline
Junior Member

Posts: 33
Threads: 17
Joined: Oct 2012
Reputation: 2
#1
Script after note is read?

Is there any way to execute a script after a note has been closed?
10-02-2014, 01:13 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Script after note is read?

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.

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

Derp.
(This post was last modified: 10-02-2014, 01:51 PM by Neelke.)
10-02-2014, 01:50 PM
Find
Spazatron Offline
Junior Member

Posts: 33
Threads: 17
Joined: Oct 2012
Reputation: 2
#3
RE: Script after note is read?

(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.

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?
10-02-2014, 02:14 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: Script after note is read?

After it has been read.

Derp.
10-02-2014, 03:28 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Script after note is 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
Find
Spazatron Offline
Junior Member

Posts: 33
Threads: 17
Joined: Oct 2012
Reputation: 2
#6
RE: Script after note is read?

(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.
10-04-2014, 11:49 AM
Find




Users browsing this thread: 1 Guest(s)