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
Just Scripting
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Just Scripting

You trigger the sound with the SetEntityCallbackFunc. If the entity can be picked up, the type of this callback will be PickUp. It then runs the PlaySound function which runs the PlaySoundAtEntity function. Basically, the sound plays when you pick up the desired item.

If you wish to play the sound at the player itself, I prefer using PlayGuiSound. Look it up at the engine scripts page. https://wiki.frictionalgames.com/doku.ph..._functions

Edit: Also, what are you trying to pick up? If it's an item, you can just click it. If it's a custom one, you'll need to do more work. There is a script called GiveItem that can give you an inventory item.

(This post was last modified: 12-25-2014, 04:42 AM by Mudbill.)
12-25-2014, 04:41 AM
Find


Messages In This Thread
Just Scripting - by ThePhrygian - 12-25-2014, 02:25 AM
RE: Just Scripting - by PutraenusAlivius - 12-25-2014, 02:57 AM
RE: Just Scripting - by ThePhrygian - 12-25-2014, 03:51 AM
RE: Just Scripting - by Mudbill - 12-25-2014, 04:41 AM
RE: Just Scripting - by Traggey - 12-25-2014, 01:33 PM



Users browsing this thread: 1 Guest(s)