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
playing music while reading note?
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#6
RE: playing music while reading note?

Change the line
void NoteMusic1(string &in asEntity, string &in asType)
to
void NoteMusic1(string &in asEntity)

You can write NoteMusic1 in either the PlayerInteractCallback, or the CallbackFunc. Depending on which callback you use, the arguments (such as string &in asEntity and string &in asType) change. The reason it didn't work is because we were saying to put it in the CallbackFunc, which is why we told you to write string &in asEntity, string &in asType. Using PlayerInteractCallback will work the same (it's probably the better choice to use for this situation) as long as you change that one line.

Edit: Forgot to add this: The difference between CallbackFunc and PlayerInteractCallback, is that the function written for the CallbackFunc is used for several events (such as the player picking it up, it breaking, igniting). If you want to use this instead of PlayerInteractCallback, you would need your script to look like this:
PHP Code: (Select All)
void StartMusic(string &in asEntitystring &in asType)
{
    if(
asType == "OnPickup") {
        
PlayMusic("01_amb_darkness.ogg"true101false); // will only play music if the player picks up the entity.
    
}


The function written for PlayerInteractCallback will only be used when the player picks the item up.

In Ruins [WIP]
(This post was last modified: 02-28-2013, 02:51 AM by NaxEla.)
02-28-2013, 02:44 AM
Find


Messages In This Thread
playing music while reading note? - by User01 - 02-27-2013, 02:20 AM
RE: playing music while reading note? - by User01 - 02-27-2013, 10:52 PM
RE: playing music while reading note? - by NaxEla - 02-28-2013, 12:38 AM
RE: playing music while reading note? - by User01 - 02-28-2013, 02:28 AM
RE: playing music while reading note? - by NaxEla - 02-28-2013, 02:44 AM
RE: playing music while reading note? - by User01 - 02-28-2013, 02:47 AM



Users browsing this thread: 1 Guest(s)