(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!