Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 946 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
eax_create and ent_playsound... #428176
08/19/13 15:49
08/19/13 15:49
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Hey guys!
To be sure that this is a bug Im asking here now since I cant stand it any longer. I really need that feature so...
Heres my code first:
Code:
#include <acknex.h>
#include <default.c>
#include <ackoal.h>

SOUND *pSound = NULL;

function test1()
{
	var han = ent_playloop(me, pSound, 500);
	var envEAXSoundSys = eax_create();
	eax_set(envEAXSoundSys, FX_UNDERWATER);
	eax_attach(envEAXSoundSys, han);
}

function test2()
{
	while(me)
	{
		if(key_a)
		{
			var han = ent_playsound(me, pSound, 500);
			var envEAXSoundSys = eax_create();
			eax_set(envEAXSoundSys, FX_UNDERWATER);
			eax_attach(envEAXSoundSys, han);
			wait(-0.5);
		}
		
		wait(1);
	}
}


function main()
{
	pSound = snd_createoal("Shoot_mono.wav");
	
	level_load(NULL);
	ent_create(CUBE_MDL, nullvector, test2);
}



You will see that test1 will work fine, but test2 will work only ONE time. After the first shoot sound appeared the second wont have any eax effects...

EDIT:

Code:
wait(-0.5);
eax_remove(envEAXSoundSys);



Doing this its working but I cant do that in my code since Im assigning the reverb to ALL eax sounds Im playing!

Last edited by Ch40zzC0d3r; 08/19/13 15:51.
Re: eax_create and ent_playsound... [Re: Ch40zzC0d3r] #430230
09/25/13 22:24
09/25/13 22:24
Joined: Dec 2012
Posts: 3
S
SashB Offline
Guest
SashB  Offline
Guest
S

Joined: Dec 2012
Posts: 3
Hi,
create EAX only once, not in a loop. this works:

Code:
function test2()
{
	var envEAXSoundSys = eax_create();
	while(me)
	{
		if(key_a)
		{
			var han = ent_playsound(me, pSound, 500);
			eax_set(envEAXSoundSys, FX_UNDERWATER);
			eax_attach(envEAXSoundSys, han);
			wait(-0.5);
		}
		
		wait(1);
	}
}


Re: eax_create and ent_playsound... [Re: SashB] #430390
09/27/13 14:36
09/27/13 14:36
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Thanks for poitning me out.
The problem was that I tried to create eax ONLY ONCE but I also called eax_set once....
Would be nice to see it in the manual that you have to call it ALWAYS before attaching the effect to a sound..


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1