Scripts / "it's too loud you die" script?

Author
Message
PROUDPIXELS | Flo
9
Years of Service
User Offline
Joined: 31st May 2015
Location: Germany
Posted: 27th Oct 2015 13:33
Hello.

I need to find a script for my game and I hope you can help me.
I have found in store yet in the forum what I need.

In this scenario, in the game you should be quiet otherwise you die.

Now my question, there is a script that an animation plays when a certain number have been activated to sound zones?

As an an example:

the caracter walking along a corridor, lying on the floor in front of him again and again
nails I would associate with a small sound zone.
while walking over it produces a noise.
if triggered on its way 5 sound zones it was too noisy and an animation will start then he dies.

I really hope you can help me. I would be very grateful.

sorry for my bad english, I'm from Germany

Best regards Flo
hiredgunz48
9
Years of Service
User Offline
Joined: 9th Sep 2015
Location: Seattle, Washington
Posted: 31st Oct 2015 07:22
Hi FLo,

Just off the top of my head, if I was going to make this, I would have a script on each object that the player should avoid, that checks for the distance, and if the player gets too close, plays a sound and creates an incremental global number each time the player gets too close to something.

Are you saying you want your player to die after like 5 things they shouldn't have touched? If so, just have a conditional check in each noisy object's script to kill off the player if they run into say 5 things, as determined by the incremental global number you set in the object's script. Not sure either about the "animation" you want to use.

best,

jan
Windows 10 64bit, Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz, 3301 Mhz, 4 Core(s), NVIDIA GeForce GTX 960 2 gig GDDR5, 16 gigs ram
PROUDPIXELS | Flo
9
Years of Service
User Offline
Joined: 31st May 2015
Location: Germany
Posted: 13th Nov 2015 08:39
Hello Jan,
Thanks for your answer.
Please excuse that I answer so late.
The player will only die if he has 5 sound zones activated.
Otherwise nothing happens and he can continue playing the level.
Should to make it plausible after activating the last of 5 sound zones a video to be played.
hiredgunz48
9
Years of Service
User Offline
Joined: 9th Sep 2015
Location: Seattle, Washington
Posted: 19th Nov 2015 18:14 Edited at: 19th Nov 2015 18:36
No problem.

Yes, although I haven't tried it personally, I'm fairly sure you can do that with sound zones and a custom lua script to check if the player is in the soundzone, increment a global counter, check the number of activated soundzones in each soundzone and play a specific sound or video with maybe PlayVideo(e,0) if the number is 5 and kill off the player.

Although it might be better if you are going to use objects as triggers, you may want to skip the soundzone and attach the lua script to them instead to do the same thing.... But just a thought.

Have you started anything yet? If so, post it and I'd be happy to help you with it.

best,

Jan
Windows 10 64bit, Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz, 3301 Mhz, 4 Core(s), NVIDIA GeForce GTX 960 2 gig GDDR5, 16 gigs ram
PROUDPIXELS | Flo
9
Years of Service
User Offline
Joined: 31st May 2015
Location: Germany
Posted: 20th Nov 2015 16:42
Thanks for your answer,
That's a good idea.
I would be happy about a collaboration.
I'll try this weekend.
I keep you updated.
Best regards Flo
PROUDPIXELS | Flo
9
Years of Service
User Offline
Joined: 31st May 2015
Location: Germany
Posted: 30th Nov 2015 19:04
hey Jan.
I tried it until today.
Unfortunately it does not work.
But I'll keep it in mind.
Best regards Flo

Login to post a reply

Server time is: 2024-12-22 07:12:42
Your offset time is: 2024-12-22 07:12:42