Page 1 of 1

o.O key pick up wont play sound?? help

Posted: August 29th, 2010, 6:17 pm
by Levcek
do some1 know why my sound dont work when u have already key and u cant pick up it again...

sound should play sound "Acces Denied"

heres the .gsc

Code: Select all

key()

{

	trig = getent("trig_key_1","targetname");
	key1 = getent("key_1","targetname");

	while(1)

	{
		trig waittill("trigger", user);
		if (!user.have_key)
		
		{
			wait 0.1;
			key1 hide();
			key1 notsolid();
			user iprintlnbold("You pick uped key 1.");
			user iprintlnbold("This key is for level 2.");
			user.have_key = true;
			wait 1;
			key1 show();
			key1 solid();
			wait 0.2;
		}
		
		else if (user.have_key)
		
		{

			user playsound("47.accessdenied");		
			user iprintlnbold("You already have this key!");
			user iprintlnbold("Go look for other keys to end the map!");
			wait 1;
			
		}
	}
}
and here is .csv

Code: Select all

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

null,,null.wav,,,,,,,,,,,
47.accessdenied,,jm_owner/47.accessdenied.wav,,,,,,10,3000,,,,looping
just help me fast tnx!

Re: o.O key pick up wont play sound?? help

Posted: August 29th, 2010, 8:10 pm
by Rezil
Make sound in your .csv non-looping.

This looks a lot like the code from jm_museum. You sure you scripted this all by yourself?

Re: o.O key pick up wont play sound?? help

Posted: August 30th, 2010, 4:59 am
by megazor
not sure, but try removing the dot so that it is '47accessdenied'

Re: o.O key pick up wont play sound?? help

Posted: August 30th, 2010, 5:40 am
by Levcek
i took it from jm_museum xD soz i just realy like it and ur scripting is so... ahh whatever xD

Re: o.O key pick up wont play sound?? help

Posted: August 30th, 2010, 5:41 am
by Levcek
ill try that what u say :)


tnx guys