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


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help - Play Music when I touch an object
iLucian Offline
Junior Member

Posts: 22
Threads: 8
Joined: Jun 2013
Reputation: 0
#11
RE: Help - Play Music when I touch an object

(07-11-2013, 07:32 PM)The chaser Wrote: Then you are using the wrong code. The violin isn't an item, is an entity. To make that work, simply put this anywhere in your script, but not in void OnStart(). Put this:

void Touch(string &in asEntity)
{
PlayMusic("music.ogg", false, 1, 1, 1, false);
}



Now, select the violin and go to the entity panel. Go down, where it says "PlayerInteractCallback" and put "Touch". Now it should work.

that worked, but the song is only 7 seconds long, and i want the music that was originally playing to start playing again, cuz the song that plays when i touch the violin loops and i dont want it to, even though i put false.

(07-11-2013, 07:32 PM)The chaser Wrote: Then you are using the wrong code. The violin isn't an item, is an entity. To make that work, simply put this anywhere in your script, but not in void OnStart(). Put this:

void Touch(string &in asEntity)
{
PlayMusic("music.ogg", false, 1, 1, 1, false);
}



Now, select the violin and go to the entity panel. Go down, where it says "PlayerInteractCallback" and put "Touch". Now it should work.

that worked, but the song is only 7 seconds long, and i want the music that was originally playing to start playing again, cuz the song that plays when i touch the violin loops and i dont want it to, even though i put false.

Wherever there is Light, Darkness has already gotten there first.
(This post was last modified: 07-11-2013, 09:20 PM by iLucian.)
07-11-2013, 09:17 PM
Find


Messages In This Thread
RE: Help - Play Music when I touch an object - by iLucian - 07-11-2013, 09:17 PM



Users browsing this thread: 1 Guest(s)