Failing on the phonograph - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Failing on the phonograph (/thread-9934.html) |
Failing on the phonograph - Acies - 08-23-2011 Hi! I'm failing to get a phonograph to play a sound. This is a part of the original code: Spoiler below!
This is my code: Spoiler below!
I have put the function in the connectionstatecallback on the entity. I'd appreciate some help RE: Failing on the phonograph - palistov - 08-23-2011 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. RE: Failing on the phonograph - Acies - 08-23-2011 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. RE: Failing on the phonograph - Acies - 08-23-2011 It didn't work. If someone has managed this I would appreciate any guidelines RE: Failing on the phonograph - Tanshaydar - 08-24-2011 Completely blind: Code: void PlaySong(string &in asEntity, int alState) RE: Failing on the phonograph - Acies - 08-24-2011 (08-24-2011, 08:10 AM)Tanshaydar Wrote: Completely blind: I have tried both alState 1 and alState -1. I'll give it a shot again though RE: Failing on the phonograph - Tanshaydar - 08-24-2011 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. RE: Failing on the phonograph - Acies - 08-24-2011 (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. 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 RE: Failing on the phonograph - Tanshaydar - 08-24-2011 Sure, I'll try it when I get home, now I don't have access to my pc. I want to use phonograph too. RE: Failing on the phonograph - Elven - 08-24-2011 I used it this way and it worked: void UseWaxOnPhono(string &in asItem, string &in asEntity) { SetWheelStuckState("bloopersphono", 0, false); PlaySoundAtEntity("", "12_make_drill.snt", asEntity, 0.0f,false); SetEntityPlayerInteractCallback("bloopersphono", "", false); RemoveItem(asItem); SetEntityConnectionStateChangeCallback("bloopersphono", "StateChangeBloopersPhono"); } void StateChangeBloopersPhono(string &in asEntity, int alState) { if(alState != 1) return; SetEntityInteractionDisabled(asEntity, true); AddEffectVoice("bloopers_extra.ogg", "", "Recording", "Bloopers", true, asEntity, 4, 16 ); } On start I put: AddUseItemCallback("bloopers", "bloopers_item", "bloopersphono", "UseWaxOnPhono", false); SetWheelStuckState("bloopersphono", -1, false); That brings back to the info that Wiki is wrong again. It asks in wiki entry first and then category, even tho it is opposite |