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

Members Online

»
1 Active | 11 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 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Script damage and sound
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 02:51 pm
I'm having trouble for some reason i can't get my head around this today.. Pretty simple result yet i can't seem to crack it, need a fresh pair of eyes because i'm probably missing something stupid.

Problem is i can't seem to get the sound or radius damage to work, any help appreciated!

Code:
trigger_fx() 
{
	fx_trigger = getent("flak_explosion", "targetname");			
	if(!isDefined(fx_trigger))
	return;

	level.fxstate = false;
	origin = fx_trigger getorigin();
	while(1) {
	fx_trigger waittill("trigger");	
	

	fx_trigger playsound("building_explo");	
	radiusDamage(origin, 500, 2000, 1000);	

	if(level.fxstate == false) {
	level.fxstate = true;
	thread loopfx("smokey01", (-136, -752, -16), 1, 0, 600);	
	thread loopfx("flame01", (-280, -880, 11), 1, 0, 600);	
	thread loopfx("flame01", (-24, -968, 112), 1, 0, 600);	
	}
	else if(level.fxstate == true) {
	level.fxstate = false;
	}
	}
	}

	loopfx(fxId, fxPos, waitime, fxStart, fxStop) {
	if(!isDefined(level.fxstate))
	level.fxstate = true;
	if(!isDefined(fxStop))
	fxStop = 600;
	if(!isDefined(fxStart))
	fxStart = 1;
	if(!isDefined(waitime))
	waitime = 1;
	loop_count = 0;

	wait (fxStart);

	while (level.fxstate && loop_count < fxStop) {
	playfx(level._effect[fxId], fxPos);
	loop_count++;
	wait (waitime);
}
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 02:56 pm
well - ill ask the obvious for the sound...did you make a csv?

as for the rest....the script looks solid, though there may be a problem with your naming conventions

i advise to stay away from words like

fx
trigger
and other things that refer to or could refer to builtin modifiers

try that and see if that works

[angryalien]

edit...isnt the sound supposed to look something like

playsound =("", );

[angryalien]

edited on Apr. 30, 2006 11:01 am by StrYdeR
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:02 pm
Yes i have a .csv, but im not 100% sure of the folder structure for COD2, so far i have

maps - mp - (.bsp .gsc .csv)
mp - (.arena)
soundalliases - (.csv)

Sound correct?
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:09 pm
it appears fine

[angryalien]
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:11 pm
BAH!

saw what this damned bbs did to my post

was supposed to say

modifier playsound =("alias",origin);

[angryalien]
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:19 pm
Right i edited the script according to your post.

Havn't tested to see if the line makes a difference but i'll go check now! If you have any ideas on the ambient then im all ears!

[Edit] I seem to get a bad syntax error with that script change:
Code:
fx_trigger playsound =("building_explo",origin);



edited on Apr. 30, 2006 11:29 am by Rasta
Share |
Bodger2
General Member
Since: Sep 4, 2004
Posts: 132
Last: Aug 5, 2006
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:41 pm
door playsound ("bunkerdooropen");

Not sure if a trigger can play a sound though.
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 03:51 pm
Ok thanks bodger, i'm trying something different, just compiling, i have included a script origin (targetname of house_sound) where i want the sound to play. In the script i added/chaged it to look like this:

Quote:
trigger_fx()
{
fx_trigger = getent("flak_explosion", "targetname"); //trigger targetname
if(!isDefined(fx_trigger))
return;

level.fxstate = false;
soundorigin = getent("house_sound","targetname"); //get the origin
origin = fx_trigger getorigin();
while(1) {

fx_trigger waittill("trigger"); //wait untill its triggered

soundorigin playsound("building_explo"); //play the sound

//fx_trigger playsound("building_explo"); //KABOOM!
radiusDamage(origin, 500, 2000, 1000); //ouch

if(level.fxstate == false) {
level.fxstate = true;
thread loopfx("smokey01", (-136, -752, -16), 1, 0, 600); //fx location (SMOKE)
thread loopfx("flame01", (-280, -880, 11), 1, 0, 600); //fx location (SMALL FLAME)
thread loopfx("flame01", (-24, -968, 112), 1, 0, 600); //fx location (SMALL FLAME)
}
else if(level.fxstate == true) {
level.fxstate = false;
}
}
}

loopfx(fxId, fxPos, waitime, fxStart, fxStop) {
if(!isDefined(level.fxstate))
level.fxstate = true;
if(!isDefined(fxStop))
fxStop = 600;
if(!isDefined(fxStart))
fxStart = 1;
if(!isDefined(waitime))
waitime = 1;
loop_count = 0;

wait (fxStart);

while (level.fxstate && loop_count < fxStop) {
playfx(level._effect[fxId], fxPos);
loop_count++;
wait (waitime);
}


If anybody can see any problem then tell me please ..

Cheers

[EDIT] Ok tested and exactly the same.. No sound and No radius damage!

edited on Apr. 30, 2006 11:59 am by Rasta
Share |
Bodger2
General Member
Since: Sep 4, 2004
Posts: 132
Last: Aug 5, 2006
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 04:09 pm
Doh! its possible to spawn script_origins in your script.No need to add them to your .map.Maybe look at _bombs.gsc for ideas.Is this SP or MP?
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Apr. 30, 2006 04:13 pm
It's MP, my intension are to destroy something, this gives off a radius damage and explosion sound, i would also like to add a shellshock efx to player nearby.

I can get the thing to blow, the efx to spawn, but not the radius damage, explosion sound of shellshock, any help greatly appreciated
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

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

»