Bothering? I have fun helping people
So, that callback you stated, I couldn't even find it in the engine scripts page. Where did you get that one from? I would suggest use AddUseItemCallback. Go to the Engine scripts page on the wiki(
http://wiki.frictionalgames.com/hpl2/amn..._functions) and search for that callback to understand which is for what. Here's an example script:
void OnStart()
{
AddUseItemCallback("", "hammer", "shelf", "DestroyShelf", true);
}
void DestroyShelf(string &in asItem, string &in asEntity)
{
//Do your stuff, whatever you want to do, here. Example:
FadeOut(2);
AddTimer("Timer_1", 2, "PlaySound");
}
void PlaySound(string &in asTimer)
{
PlaySoundAtEntity("", "YOURBREAKSOUNDHERE.snt", "shelf", 0, false);
AddTimer("Timer_2", 1, "FadeInFunction");
}
void FadeInFunction(string &in asTimer)
{
FadeIn(2);
}
This script basically makes you fade out for 2 seconds after you used the hammer on the shelf, plays the sound you wish for, and after 1 second it fades back in for 2 seconds.