Scripts / Falling entities (boxes) and make an impact sound

Author
Message
thatandplaygames
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location: In a creative space
Posted: 22nd May 2022 17:26
I have a trigger zone that triggers a few Falling boxes from above the player. I want them to make a sound on impact. Right now, the trigger zone plays a falling boxes sound effect. I wondered if it was possible to have each box that falls to make its own impact sound.

Thanks!
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 23rd May 2022 12:08
Take a look at this link. Might have what your looking for.

https://forum.game-guru.com/thread/222524#msg2639282
PM
thatandplaygames
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location: In a creative space
Posted: 23rd May 2022 14:58
Thanks, bluemeenie195!! I'll check out your script!
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd May 2022 20:52
If the objects are physics objects then you can us the physlib function AddEntityCollisionCheck( e ) and then use GetEntityTerrainNumCollisions( e ) and GetEntityObjectCollisionDetails( e ) to trigger your sounds.

Look in pickuppables.lua to see how they are used.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-04-25 04:42:20
Your offset time is: 2024-04-25 04:42:20