Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: World at War
Category: CoDWW Scripting
Scripting and coding with Call of Duty: World at War.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: sound to fx problem
dundy
General Member
Since: Dec 14, 2004
Posts: 768
Last: Nov 1, 2020
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Sunday, May. 9, 2010 07:34 pm
Made a blowup wall with a detenator works fine

added fx works fine..but i wanna add sound to fx

techno2sl helpt me with it,but as understand he has pc problems

So i wonder if someone can help

Get this in devmode

script runtime error

getent used with more than one entity

file 'maps/mp/__detonator_sound.gsc ,line 10

detsound = getent ["detnator_sound", "targetname"} ;

file 'maps/mp/__detonator_sound.gsc ,line 4

Code:
main()  { thread explosion_sound(); }  explosion_sound() { trig = getent("detonator_trig", "targetname"); detsound = getent("detonator_sound", "targetname"); while (1) { trig waittill("trigger");  // playsoundatposition("your_sound",(X, Y, Z));  detsound playsound("explosion_impact_09");  wait (2);  } }


Being a complete noob with this[banghead] can

someone tell me what to do

Or is there a otherway to get this done...

Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Sunday, May. 9, 2010 10:59 pm
It seems that you have more than one entity with the targetname of detonator_sound in your map. To support this, use this script, which will loop through each entity with the targetname and player the sound at each.

Code:

main()  
{ 
	thread explosion_sound(); 
}  

explosion_sound() 
{ 
	trig = getEnt( "detonator_trig", "targetname" );
	detSoundSpot = getEntArray( "detonator_sound", "targetname" ); 
	
	while(1) 
	{ 
		trig waittill( "trigger" );  
		
		for( d = 0; d < detSoundSpot.size; d++ )
		{
			detSound = detSoundSpot[d];
			detSound playSound( "explosion_impact_09" );   
		} 
	}
}


Or, find all but one of the entities with the targetname of detonator_sound and delete them, and use your original script.
Share |
dundy
General Member
Since: Dec 14, 2004
Posts: 768
Last: Nov 1, 2020
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Monday, May. 10, 2010 12:32 am
oke did the last option and found that i had also seleted the wall

removed the targetname from it, but still no sound to the fx

Do have to redo the wall or was it enough to remove the targetname
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»