Scripts / Script sound box drop

Author
Message
Aizark
5
Years of Service
User Offline
Joined: 4th Jul 2019
Location:
Posted: 4th Jul 2019 13:29
Hello, when pushing objects, objects fall, rotate. The explosion can throw them into the air, hit the wall. However, there is no sound, I would like to add sound to the object when it falls, during a pushing or any similar event. I would like to add an event through a collision, but I don’t know how to denote an event "if"
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Jul 2019 16:10
this should work, assign to the object you wish to make a sound and add sounds in slot 0 and 1
noise_on_collision.lua
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 4th Jul 2019 19:06
awesome smallg, thats something I wondered about too, great stuff. thanks.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Roland D05 Synth Module, Bluedio Victory V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics. Acer Swift i3 Laptop with Intel Optane memory, Intel 620UHD GPU, Windows 10 64bit.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jul 2019 22:59
I would just add that to avoid killing performance if you have a lot of objects with this script just have the code execute every 1/10 th of a second or less, "hit's" are accumulated in the list over time so you don't need to execute every frame!
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Jul 2019 23:31
Hey there smallg. Do you (anyone) know if these scripted sounds
are supposed to play automatically 3d (louder when closer, fainter
when farther)? They are not doing that in my tests,
does that have to be inserted into script? Thanks.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Jul 2019 00:31
Any non-stereo sound attached to an entity (has to be .wav I believe) will play from the entities position at the time it is triggered.

.ogg or stereo sounds play from the players position (that's what stereo means!).

Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-22 14:29:06
Your offset time is: 2024-12-22 14:29:06