Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to input sound?
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: How to input sound?

You can use entity interact callback, which runs when player interacts with an entity.
For interact call back, you can play a sound.

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);
-> to this:
SetEntityPlayerInteractCallback("entity name", "Function", true);
if you want sound to play every time you interact with the object, then this:
SetEntityPlayerInteractCallback("entity name", "Function", false);

then you need to write a function:

void Function(string &in entity)
{
PlaySoundAtEntity("sound name", "sound you want to play with .snt extension", "entity you interacted", 0, false);
}

06-28-2011, 06:34 PM
Website Find


Messages In This Thread
How to input sound? - by fuytko - 06-28-2011, 06:17 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 06:34 PM
RE: How to input sound? - by fuytko - 06-28-2011, 06:53 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 06:55 PM
RE: How to input sound? - by fuytko - 06-28-2011, 07:03 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 07:09 PM
RE: How to input sound? - by fuytko - 06-28-2011, 07:26 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 07:32 PM
RE: How to input sound? - by fuytko - 06-28-2011, 07:37 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 07:41 PM
RE: How to input sound? - by xtron - 06-28-2011, 07:41 PM
RE: How to input sound? - by Tanshaydar - 06-28-2011, 07:43 PM
RE: How to input sound? - by xtron - 06-28-2011, 07:52 PM
RE: How to input sound? - by fuytko - 06-28-2011, 07:57 PM



Users browsing this thread: 1 Guest(s)