Scipt Which activates a sound when you pickup a note HELP not working - 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: Scipt Which activates a sound when you pickup a note HELP not working (/thread-14898.html) |
Scipt Which activates a sound when you pickup a note HELP not working - meneadeszz - 04-18-2012 hello. i would like to have a script when you pickup an item music or a sounds starts playing. im thinking something like this SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction); SetEntityPlayerInteractCallback("Letterone", "PickUpNote1", false); asName - internal name asCallback - function to call abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity void MyFunc(string &in asEntity) void PickUpNote1(string &in asEntity) { PlaySoundAtEntity("NoteRoar", "insanity_monster_roar03.snt", "Note1Roar", 0, false); } PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound); Could somebody help me i don't see a problem i don't see a erro when i start the story but when i pick up Letterone. The soundsdoesn't start RE: Scipt Which activates a sound when you pickup a note HELP not working - i3670 - 04-18-2012 You can look up how FG did it in Amnesia. They basically type in the CallbackFunc window the name of the callback and then script it like this. void PickNoteToSelf(string &in entity, string &in type) { PlayMusic("01_paper_self.ogg", false, 0.7f, 0, 10, false); } RE: Scipt Which activates a sound when you pickup a note HELP not working - meneadeszz - 04-18-2012 (04-18-2012, 05:27 PM)i3670 Wrote: You can look up how FG did it in Amnesia.who is FG RE: Scipt Which activates a sound when you pickup a note HELP not working - Datguy5 - 04-18-2012 LOL.FG means frictional games they are the makers of amnesia if you didnt know that.. RE: Scipt Which activates a sound when you pickup a note HELP not working - i3670 - 04-18-2012 Frictional Games RE: Scipt Which activates a sound when you pickup a note HELP not working - Datguy5 - 04-18-2012 I ninjad you i3670 >:D RE: Scipt Which activates a sound when you pickup a note HELP not working - i3670 - 04-18-2012 Ye noticed |