| 
		
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| Scipt Which activates a sound when you pickup a note HELP not working 
 
				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
 |  |  
	| 04-18-2012, 04:40 PM |  |  
	
		| i3670   Posting Freak
 
 Posts: 1,308
 Threads: 74
 Joined: Oct 2011
 Reputation: 
36
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				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);
 
 }
 
 
 |  |  
	| 04-18-2012, 05:27 PM |  |  
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				 (04-18-2012, 05:27 PM)i3670 Wrote:  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);
 
 }
 who is FG 
			 |  |  
	| 04-18-2012, 05:32 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				LOL.FG means frictional games    they are the makers of amnesia if you didnt know that..
			
 
				
(This post was last modified: 04-18-2012, 05:38 PM by Datguy5.)
 |  |  
	| 04-18-2012, 05:38 PM |  |  
	
		| i3670   Posting Freak
 
 Posts: 1,308
 Threads: 74
 Joined: Oct 2011
 Reputation: 
36
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				Frictional Games
 
 |  |  
	| 04-18-2012, 05:38 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				I ninjad you i3670 >:D
			 
 |  |  
	| 04-18-2012, 05:38 PM |  |  
	
		| i3670   Posting Freak
 
 Posts: 1,308
 Threads: 74
 Joined: Oct 2011
 Reputation: 
36
 | 
			| RE: Scipt Which activates a sound when you pickup a note HELP not working 
 
				Ye noticed   
 |  |  
	| 04-18-2012, 05:40 PM |  |  |