Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / How do you play a sound when picking up an item?

Author
Message
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 22nd Mar 2013 23:09
Alright, I'm at the point in my game where I'm trying to plan out how all of the main parts of the game are going to work. A part of such process is making my character react to the world around him. Basically what I'm trying to accomplish is to have a sound play when the player interacts with an entity, let's say picking up a weapon. How do I alter the script of the weapon to play a sound from the audiobank directory? I have no scripting knowledge and am really struggling with trying to figure this problem out on my own. Any help is gladly appreciated!

In Matrix, you bend spoon.
In Soviet Russia, spoon bends you.
Tomahawk
11
Years of Service
User Offline
Joined: 16th Dec 2012
Location: Where do you think I live?
Posted: 23rd Mar 2013 01:47
Go to the script bank and find the script that the item has under "main". For example lets look at the weapon pickup script, you would change this line right here

You would change the location to match the sound that you wanted.

Hope this helps,
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 25th Mar 2013 00:24
Oh wow I'm clueless.... Thanks man!

In Matrix, you bend spoon.
In Soviet Russia, spoon bends you.

Login to post a reply

Server time is: 2024-11-23 16:51:55
Your offset time is: 2024-11-23 16:51:55