Scripts / Sound in zone

Author
Message
LFR
6
Years of Service
User Offline
Joined: 12th May 2018
Location:
Posted: 11th Jun 2018 18:08
hi!
I wonder if there is a way to play a .wav all to the end without stop.


function soundinzone_init(e)
end

function soundinzone_main(e)
if g_Entity[e]['plrinzone']==1 then
PlaySound(e,0)
end
end

This is my script. But when i go out of the trigger zone the sound stop, i need to keep playing the file to the end

Any clues?
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Jun 2018 21:35
try this and see if it works.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
LFR
6
Years of Service
User Offline
Joined: 12th May 2018
Location:
Posted: 12th Jun 2018 19:25
Sory it doenst work... when i go out of the trigger zone the sound stops
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 12th Jun 2018 22:47
ok i have just tested and it is working. i have placed a sound zone and it play the wav file up to the end even if i am out of the sound zone area .
script for the sound zone is


i have just took out the part of Destroy(e) so that it would work every time.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
LFR
6
Years of Service
User Offline
Joined: 12th May 2018
Location:
Posted: 13th Jun 2018 15:29
@PCS Thanks!!!

i will test it today...

also, do you know a way to reproduce that .wav just one time? every time i walk the soundzone the .wav its playing from the begining ... its there a way to reproduce it one time only and "destroy" the soundzone?

PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 13th Jun 2018 16:43
just take the -- out from in front of Destroy(e) that should do it.
[img]belidos3d.swgrp.co.uk/wp-content/uploads/2016/03/blogo.png[/img]
Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Login to post a reply

Server time is: 2024-12-22 19:50:23
Your offset time is: 2024-12-22 19:50:23