Product Chat / What do entity Sound 1 and Sound 0 do?

Author
Message
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 9th Aug 2015 19:15
What do entity Sound 1 and Sound 0 do?

I've tried adding a sound to a rocking boat, but it's not working. How do I use Sound 1 and Sound 0?
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 9th Aug 2015 21:50 Edited at: 9th Aug 2015 21:50
If you have a sound file called, for example, rockingboat.ogg, place it in the audiobank>misc folder. In the FPE file, add the following code -
;Sound
soundset = audiobank\misc\rockingboat.ogg
It doesn't have to the audiobank>misc folder, as long as the path in the FPE file matches the file location. You can also set the sound path in the properties panel.
Then you'll need to do some scripting to play the sound, using PlaySound(e,0) or LoopSound(e,0)
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 00:31 Edited at: 10th Aug 2015 00:32
What does sound 1 in the properties panel do? Is Sound 0 in the properties panel, LoopSound?
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 10th Aug 2015 01:36
Look at the animated door and script. that is what sound 0 and sound 1 are for.

It allows for two sounds to be used. IE: open door sound, and close door sound.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 02:39 Edited at: 10th Aug 2015 02:42
I guess that's why some things have 2 sound sets and others have only one. Open and close.

Where can I get a list of what the Properties commands do? I think I read that Sound0 is for loops, but I don't know for sure. Does Sound1 do something else too? Some of the sounds have issues and it's hard to tell what is doing what.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 10th Aug 2015 03:47 Edited at: 10th Aug 2015 03:47
It is unfortunate we are limited to only two sounds per entity. I don't recall this limitation in FPSCx9.
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 04:00 Edited at: 10th Aug 2015 04:05
Do entities have to be interacted with to play their assigned sound?

Here's what I'm trying to do: I have a rocking boat on a table that is seemingly being painted by an NPC, I want it to sound like work is going on there, such as painting. So, I assigned two sounds to the boat, but neither sound is working.

I've shot the boat and neither sound, sound off (activate). I've assigned sounds to both of them at the same time, I've assigned one sound to Sound0 only, tried it again, it didn't work, then assigned only one sound to Sound1 and it didn't make a sound.

I know I can create a sound zone to handle one sound, but I'm trying to utilize that for other things in the area and be efficient by just adding the sound/s to the boat.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 10th Aug 2015 05:11
Will need a bit of LUA scripting work:

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 06:54
Alright thanks, I'll see what I can do.
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 08:19 Edited at: 10th Aug 2015 09:04
Like this? Nevermind on this code, this one didn't work. How and where do I add the one you are showing me?

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Aug 2015 09:59
You've to attach script to entity via properties panel and/or via fpe file, so if you've script named "default.lua", it looks like you state above:

Quote: ";ai
aimain = default.lua"


But in order it works, entity should be dynamic:

Quote: "defaultstatic = 0"


3com



Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 16:56 Edited at: 10th Aug 2015 17:04
I set the "defaultstatic = 0", applied the script to the boat and am getting no sound from it.

I don't know if I put the file in the right place or not. When I click on AI System Main properties, the file isn't located in the script bank. Should it be there in order for it to work? Right now it's located in a different file location inside GG.

Or does it have to be scripted with the PlaySound script, instead of soundset?



Thanks for the help by the way, I'm about as green as they come at the moment.
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 17:55
I tried it this way and am getting no results either.

FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 18:08
So I tried it this way, then added sounds o and 1 through the properties panel, and not getting sound.

FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 18:22
And I've tried it like this and added the sound through the properties, and no sound.

FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 18:57 Edited at: 10th Aug 2015 18:59
And this is the last one I tried, to no avail. I'm doing something wrong somewhere.

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Aug 2015 19:47 Edited at: 10th Aug 2015 19:49
they dont go in the fpe, but in the lua file.

create a file called
boatsound.lua
in your scriptbank folder and give it this



then set your boat dynamic (static = no) and give it your sound at slot 1 and the above script in it's ai main setting
*if the sound is too soon or late then change the 500 lower or higher (respectively)*
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 21:33
Weirdest thing--I was just coming here to notify anyone watching that that was the problem. I was working in the FPE file. Face palm!

Thank you very much for posting how to create the boatsound.lua file smallg, that was the very next thing I was going to ask how to do.

I'll post the results later after dinner, but I'm sure it will work.

TYVM
John
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 10th Aug 2015 22:13
It works! That is awesome. Thank you, thank you, thank you! How can I repay you?
SoUlFaThEr
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 11th Aug 2015 15:28
Ya know smallg helps so many people in this forum with scripting whether its simple or complicated stuff ......I vote he gets a flag of Member of the Year on his account.

He honestly deserves this imo.
The only stupid questions are those that were never asked.
PM
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 12th Aug 2015 03:13
Definitely something, that code right there--plays a huge role in what I'm trying to accomplish. And, the time it saved me learning how to do it, was probably another 6 videos of instruction.

Acid too, they wrote a couple of scripts for me that are going to have a huge impact on my games gameplay.

And there are many others that have been nothing but patient and helpful.

But yeah, I definitely owe smallg for that one. smallg has nothing in the store to buy, so they have a place in all my videogame credits for a long time to come.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 12th Aug 2015 05:07
Glad you got it working and I agree smallg deserves one of those forum badges
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 12th Aug 2015 05:22 Edited at: 12th Aug 2015 05:23
Yeah, it's pretty cool too. Added it just as I mentioned, and made one NPC almost un-killable to make it almost believable they were working on the boat, the animation isn't the way I want it, I have her doin' the butterfly thing )) I'll use it for a lot of stuff though.

You help a lot too Teabone. I'm only getting started and still feeling things out. I'm sure I'm gonna be adding a lot of folks to the credits list and buying things from them over time.

It's hard to keep track of things right now, but I'll make it right in the end. I'm writing names and acts down. But if someone slips through the cracks for whatever reason--I don't have a problem being called onto the carpet for it, and I'll fix it.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 13th Aug 2015 04:10
Quote: "Ya know smallg helps so many people in this forum with scripting whether its simple or complicated stuff ......I vote he gets a flag of Member of the Year on his account."


Quote: "Glad you got it working and I agree smallg deserves one of those forum badges "



I agree! At the very least he should be promoted to a big G!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 13th Aug 2015 23:53 Edited at: 13th Aug 2015 23:53
lol sadly took me a second to truly get that joke.
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 17th Aug 2015 16:11
Capital G

Login to post a reply

Server time is: 2024-11-25 09:32:01
Your offset time is: 2024-11-25 09:32:01