Hi! I'm failing to get a phonograph to play a sound.
This is a part of the original code:
Spoiler below!
// The phonograph by the entrance
void StateChangePhono01(string &in asEntity, int alState)
{
PlayPhono(2, 1, 2, asEntity);
}
// Play the phonograph messages on interact with phonograph
void PlayPhono(int iLevel, int iSet, int iPart, string &in sEntity)
{
SetEntityInteractionDisabled(sEntity, true); //No more interact with phono as it does not do anything.
Try making the entity for the connection state callback "phonograph_1_lever" or something like that. Open the entity in the model editor and see what the lever body is called and just append that onto your phonograph's name.
It confuses me how that will affect it, since there are no name changes in justine. I'll give it a try though. On an off-topic note I will soon give you further details on the map I'm making for the community project.
Phonograph is basically a valve, so it has its states. The code you wrote would invoke regardless of the state.
In Justine, there are more than one functions bound to phonograph. You might want to take a look at all of them.
(08-24-2011, 10:57 AM)Tanshaydar Wrote: Phonograph is basically a valve, so it has its states. The code you wrote would invoke regardless of the state.
In Justine, there are more than one functions bound to phonograph. You might want to take a look at all of them.
I have looked at what I percieve as "all of them". The ones I posted in the original post is the ones which makes it play a sound. I can not mimic it though, which is why I ask for help. If you could take the time to try it out I would appreciate that