(03-16-2013, 03:26 PM)plutomaniac Wrote: 1) As far as I understand pickuptinder is the internal name and PickUpTinder is the function to call. But where do you actually specify at which entity the callback will execute?
2) So for music I should probably use PlayMusic and for small sounds PlayGuiSound. Because if I want to play a scared sound (reaction) which is like 2 seconds, noone will even notice the 3D lack.
Edit: At PlayMusic I think it says that only the sound with the highest priority can be heard. What does that mean? Because when I first read it I thought that only one sound can be played at any given time making multiple sound playback not possible, something that I know is not true.
3) Thank you for the info, that thread was indeed helpful. When I'm done with everything I will spend some time improving the performance and I will add all those performance fixes. There's also a small guide at the wiki as far as I recall. But that's for later...
1)
asName is the internal name for the item (the name it's called in the level editor).
SetEntityPlayerInteractCallback(asName, asCallback, abRemoveOnInteraction);
2) Yes, you should use PlayMusic for music, and for sounds, you should use either PlaySoundAtEntity or PlayGuiSound. If you don't need the sound to be 3d, then use PlayGuiSound. Regarding the priority stuff, only the music with the highest priority will play.
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
You can have multiple sound playing at the same time, but only one music track is allowed to be played.