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
Wroong section for this.You should post this in the support section.
Also its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
(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)meneadeszz Wrote: [ -> ] (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
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)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.
Also its SetEntityCallbackFunc("ITEMS NAME", "FUNCTION");
i called the note Letterone the same name like ine ditor and lang file
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?
{
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)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
Uploaded with
ImageShack.us
You have to name the customsubitemtype too.Just name it the same as the textentry.
(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!