Scripts / loop sound zone stop when player enters "transportinzone"

Author
Message
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 5th Jun 2015 07:29

every time I use "transportinzone"

to teleport from point to point

so the 3D sound is stop any ideas?

the 3D sound from here https://forum.game-guru.com/thread/211739

thanks.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 5th Jun 2015 07:38
Not sure why you're using the 3D sound script when teleporting. It's a sound distance from object script and if you move away then it will obviously stop.

To help further here I'd need to see your script.

Please paste it between "code" tags
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 5th Jun 2015 11:14
I use the 3D sound for bar I made, the music comes inside the room and when you get closer you hear it more

the teleport its for another thing in the map, there is no connection between them, but if I use the zone of the teleport its disable the loop sound effect when I visit the bar again. here the sound script.

"-- reconditioned script (based on the HockeyKid script).
-- Script 3D surround sound to GameGuru. Object interaction AlgoStep Company (DevCore35, Adrien, Gaetan)
-- This script can be used in commercial games

function soundbinau_init(e)
nlevel=0
maxvolume = 100
minvolume = 1
noise = 0
end

function soundbinau_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;
PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
nvolume = maxvolume - ( PlayerDist / 35.0 )

if nvolume < minvolume then
StopSound(e,0)
noise=0
else
if noise == 0 then
LoopSound(e,0)
noise = 1
end
SetSoundVolume(nvolume)
end
end"
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 5th Jun 2015 11:57
That code *should* be working so there must be something in your teleport script. I need to see what your teleport script is doing too.

Again, can I ask you to please use "code" tags. Thanks.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 5th Jun 2015 12:24
can the LoopSound(e,0) be changed to LoopSound(e,1) ?
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 5th Jun 2015 13:28 Edited at: 5th Jun 2015 13:29
If he had the sound working originally then position"1" shouldn't be the issue. I do know that script had issues with multiple sounds, I think you found that too Tarkus (from memory).

It's possible another sound or more probably, an entirely different "e" is causing the issue here because the sound works based on proximity to "e".
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 5th Jun 2015 17:58 Edited at: 7th Jun 2015 11:12
I did have issues with that script, but I have PM'd Lee with a solution that could possibly help, the sound needs to be hard coded.

More than 2 slots

slot 0 for Music
slot 1 for SFX
and a new slot 2 for dialog,

each with controllable volumes, don't know if that possible,, but it would make a big difference.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 7th Jun 2015 10:05 Edited at: 7th Jun 2015 10:10
Hi

this is the teleport zone script I uploaded it,

and a video that show exactly the bug sorry for low quality

thanks.

youtube.com/watch?v=fTK28O12fDU&feature=youtu.be

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 7th Jun 2015 17:44 Edited at: 7th Jun 2015 17:52
works for me, teleporting back or walking back the sound still plays

although the original script works i would suggest this one is cleaner
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 7th Jun 2015 18:24 Edited at: 7th Jun 2015 18:25
that script is so useful smallg, thank you so much now I can assign LoopSound(e,1) to sfx and leave the soundtrack
playing in slot 0.

Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 7th Jun 2015 19:25
Does GG stop LoopSound from playing if player is far enough away from source if not how do I stop the loop, if player is far away?
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 7th Jun 2015 20:24
@smallg

thank you so much you solved it,

maybe you guys have good script for light, I want to cause to some lights to flash like siren,

I have some script but its cause to all the static lights in the map to flash also if I get distance from them this is the script I use.

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Jun 2015 01:19
do your static lights have a script applied? try removing it?
i cant remember how to show static lights so can't test it but it shouldnt be causing any issues
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 8th Jun 2015 08:34
i thought to flash lights they had to be dynamic…
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 8th Jun 2015 11:05 Edited at: 8th Jun 2015 11:06
All the lights should be dynamic if its static the light not show at all
I tried to remove the regular light script but the light who flashing still effecting on it.
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 8th Jun 2015 11:56
i noticed taht if you have more then 4 lights, then you get this problem with the flashing script.


Harry


Harry
PM
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 9th Jun 2015 08:58
Actually its started from 3 lights, two lights its not happen
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 11th Jun 2015 20:50
So there is some way to solve it?
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 26th Aug 2015 15:28
Peri did you solve your issue??
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 26th Aug 2015 22:03
only 4 dynamic lights can be on at the same time with in a range of each other. Hard coded in the engine this way.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 26th Aug 2015 22:32
what do you mean for range?? the vale can be set on fpe that is default 500??

if so.. my lights arent in the range of each other but the issue appear the same..
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 1st Sep 2015 22:31
Hi JC LEON

sorry for the delay I didn't solve it.

Login to post a reply

Server time is: 2024-12-22 04:50:44
Your offset time is: 2024-12-22 04:50:44