Scripts / [SOLVED] Cannot get Ambience Zone script to play on each life in game.

Author
Message
jjumisko
4
Years of Service
User Offline
Joined: 11th Dec 2019
Location: Los Angeles
Posted: 27th Mar 2020 19:19
I'm assuming I need to modify this, but I am not very Lua fluent. Can anyone help with how to get it to reset with each life (like if my player dies and respawns at the start marker)? I want the sound loop I am using to play just like the first life.

Thanks in advance for any help you can give me!

Jeff

Acer Nitro 5
2.4 GHz Core i5
GeForce GTX1050
32Mb SDRAM

The author of this post has marked a post as an answer.

Go to answer
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Mar 2020 19:37
This post has been marked by the post author as the answer.
use the normal sound zone , and place it over your start maker
then modify the soundinzone.lua like this.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Mar 2020 22:06
basically you need a script that detects when the player dies (set it always active = yes)
check_death.lua
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
jjumisko
4
Years of Service
User Offline
Joined: 11th Dec 2019
Location: Los Angeles
Posted: 30th Mar 2020 18:47 Edited at: 30th Mar 2020 19:34
@PCS - there was a reason I used the Ambience Zone instead of the Sound Zone. Right now, I can't remember.

@smallg - Do I just put this script in a rock or something - like how in Unity you use an empty object?

Thanks to you both. I'll try using one or the other thing.
Cheers

UPDATE: I used Both of your scripts. I did place the smallg snippet in a rock, and I changed out the Ambience Zone for the Sound Zone, with the commented out destroy command from PCS. Thank you! My game is now ready for beta testing!
Acer Nitro 5
2.4 GHz Core i5
GeForce GTX1050
32Mb SDRAM
PM

Login to post a reply

Server time is: 2024-03-28 11:34:46
Your offset time is: 2024-03-28 11:34:46