| 
		
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				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, 03:59 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				Wroong section for this.You should post this in the support section. Also its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
 
 
				
(This post was last modified: 04-18-2012, 04:03 PM by Datguy5.)
 |  |  
	| 04-18-2012, 04:00 PM |  |  
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				 (04-18-2012, 04:00 PM)Datguy5 Wrote:  Wroong section for this.You should post this in the support section.Also its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
 i called the note Letterone the same name like ine ditor and lang file 
			 |  |  
	| 04-18-2012, 04:25 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				 (04-18-2012, 04:25 PM)meneadeszz Wrote:   (04-18-2012, 04:00 PM)Datguy5 Wrote:  Wroong section for this.You should post this in the support section.i called the note Letterone the same name like ine ditor and lang fileAlso its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
 
Umm so?You just replace those i put with your items name and the function can be anything.JUST MAKE SURE ITS THE SAME AS IT IS IN THE VOID!!
			 
 |  |  
	| 04-18-2012, 05:05 PM |  |  
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				 (04-18-2012, 05:05 PM)Datguy5 Wrote:   (04-18-2012, 04:25 PM)meneadeszz Wrote:   (04-18-2012, 04:00 PM)Datguy5 Wrote:  Wroong section for this.You should post this in the support section.i called the note Letterone the same name like ine ditor and lang fileAlso its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
 Umm so?You just replace those i put with your items name and the function can be anything.JUST MAKE SURE ITS THE SAME AS IT IS IN THE VOID!!
 I dont'understand what you mean. 
 
if in the void the name of the item is the same like in the editor and the .lang file then it's good?
			 |  |  
	| 04-18-2012, 05:12 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				{SetEntityCallbackFunc("ITEMS NAME", "PickUpNote1");
 }
 void PickUpNote1(string &in asEntity)
 {
 PlaySoundAtEntity("NoteRoar", "insanity_monster_roar03.snt", "Note1Roar", 0, false);
 }
 The FUNCTION is the functions name after the void.Then rename the ITEMS NAME with your notes name.
 
 
 |  |  
	| 04-18-2012, 05:37 PM |  |  
	
		| meneadeszz   Junior Member
 
 Posts: 20
 Threads: 9
 Joined: Apr 2012
 Reputation: 
0
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				 (04-18-2012, 05:37 PM)Datguy5 Wrote:  {SetEntityCallbackFunc("ITEMS NAME", "PickUpNote1");
 }
 void PickUpNote1(string &in asEntity)
 {
 PlaySoundAtEntity("NoteRoar", "insanity_monster_roar03.snt", "Note1Roar", 0, false);
 }
 The FUNCTION is the functions name after the void.Then rename the ITEMS NAME with your notes name.
 it's Still not working i will show you .
 
SetEntityCallbackFunc("Letterone", "PickUpNote1"); 
}
 
void PickUpNote1(string &in asEntity) 
{ 
	PlaySoundAtEntity("Letterone", "insanity_monster_roar03.snt", "Note1Roar", 0, false); 
}
 
Here is a picture of the hps and editor..on the General tab the name is the same as entity
 ![[Image: note1k.jpg]](http://img818.imageshack.us/img818/4752/note1k.jpg)  
Uploaded with ImageShack.us |  |  
	| 04-18-2012, 06:12 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				You have to name the customsubitemtype too.Just name it the same as the textentry.
			 
 |  |  
	| 04-18-2012, 06:23 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: I want toactivate a sound when i pickup a note below is a script HELP!! 
 
				 (04-18-2012, 03:59 PM)meneadeszz Wrote:  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
 i allways use this  
" 
void OnStart() 
{ 
SetEntityPlayerInteractCallback("THE ENTITY NAME", "the func", false);
 
}
 void the func (string &in asEntity) 
{
 
PlaySoundAtEntity("", "insanity_monster_roar03.snt", "Note1Roar", 0 , false);
 
}
   try that out! 
			 
 |  |  
	| 04-18-2012, 06:48 PM |  |  |