meneadeszz
Junior Member
Posts: 20
Threads: 9
Joined: Apr 2012
Reputation:
0
|
Script which activates a sound when you pick up something. Help please
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:26 PM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: Script which activates a sound when you pick up something. Help please
*Answer in the other thread, created by you*
|
|
04-18-2012, 07:55 PM |
|
LulleBulle
Member
Posts: 101
Threads: 33
Joined: Feb 2012
Reputation:
0
|
RE: Script which activates a sound when you pick up something. Help please
void OnStart()
{
void SetEntityCallbackFunc("letterone", "PickUp");
}
void PickUp(string &asEntity, string &in type)
{
PlaySoundAtEntity("Play", "SoundFileHere", "Player", 0, false);
}
(This post was last modified: 04-18-2012, 10:42 PM by LulleBulle.)
|
|
04-18-2012, 10:39 PM |
|