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
Phonograph and Waxroll HELP
iLucian Offline
Junior Member

Posts: 22
Threads: 8
Joined: Jun 2013
Reputation: 0
#1
Phonograph and Waxroll HELP

So i am making a custom story and i want u to b able to find a waxroll record and put it in the phonograph, then crank it up and it plays music. Ive been searching for scripts and tutorials on how to do that and so far nothing has come up! Can someone plz help me!

Wherever there is Light, Darkness has already gotten there first.
07-10-2013, 01:07 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Phonograph and Waxroll HELP

Open a Justine's map, check its code.

Sorry i gave you a short answer but that's about it.
For the music you may need the function PlaySoundAtEntity instead of PlayMusic.
So you can center the music on the phonograph thing.

(This post was last modified: 07-10-2013, 05:27 AM by Daemian.)
07-10-2013, 05:21 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Phonograph and Waxroll HELP

void OnStart()
{
SetLocalVarInt("PhonographWax", 0);
AddUseItemCallback("", "WaxRoll", "Phonograph", "EnablePhono", true);
SetMultiSliderCallback("Phonograph", "PlayMusic");
}

void EnablePhono(string &in asItem, string &in asEntity)
{
AddLocalVarInt("PhonographWax", 1);
}

void PlayMusic(string &in asEntity, int alState)
{
if(GetLocalVarInt("PhonographWax") == 1)
{
PlaySoundAtEntity("", "sound.snt", "Phonograph", 0.1f, false);
}

else
{
}
}

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 07-12-2013, 05:06 AM by PutraenusAlivius.)
07-12-2013, 05:06 AM
Find




Users browsing this thread: 1 Guest(s)