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
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: Help - Play Music when I touch an object

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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
07-11-2013, 07:32 PM
Find


Messages In This Thread
RE: Help - Play Music when I touch an object - by The chaser - 07-11-2013, 07:32 PM



Users browsing this thread: 1 Guest(s)