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

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

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

Post by Levcek » August 29th, 2010, 6:17 pm

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!
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

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

Post by Rezil » August 29th, 2010, 8:10 pm

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?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

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

Post by megazor » August 30th, 2010, 4:59 am

not sure, but try removing the dot so that it is '47accessdenied'

Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

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

Post by Levcek » August 30th, 2010, 5:40 am

i took it from jm_museum xD soz i just realy like it and ur scripting is so... ahh whatever xD
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

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

Post by Levcek » August 30th, 2010, 5:41 am

ill try that what u say :)


tnx guys
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest