Project X Forums



It is currently Wed Jun 18, 2025 9:12 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: custom sound at explosion. i need help
PostPosted: Wed Sep 26, 2012 3:52 pm 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
i need to change a weapons sound before it explodes, like the holy nades hallelujah. i have to luck trying to copy other peoples scripts, can anyone help me out?

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Wed Sep 26, 2012 4:53 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
this can be done in weapon table editor, SOUND button


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Thu Sep 27, 2012 1:25 am 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
yeah except i want to use a non-native sound, could i use a sound overwriting script?

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Thu Sep 27, 2012 1:48 am 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
//List of sprites
Csoundfile* laugh1;


void laugh::InitGraphic()
{
//Loading picture data
CFile *f;
f = GetAttachment("laugh.wav");
laugh1 = Loadsoundfile(1.2, 0.0, false);
}

//Let's override the sprites!
SetsoundfileOverride(451, laugh1);


i made that from your sprite override script, but it doesnt work, i get an error on the last line

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Thu Sep 27, 2012 1:10 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
Twicken wrote:
SetsoundfileOverride

lol wut? that function doesn't exist. only entuser can do it. you can't replace sounds atm
also, sounds are best loaded from Init, and not InitGraphic.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Thu Sep 27, 2012 2:42 pm 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
hmm ok well i guess ill have to live with a soundless hell grenade lol.

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Fri Sep 28, 2012 11:24 am 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
i can make a script which will allow you to produce the sound by script by detecting a number which you've set from editor. but that isn't a replacement. it's sort of crutch because we mute the original sound and play our own instead.
however, you can use huge sound values which have no sound anyway, and so muting will not be needed ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Fri Sep 28, 2012 12:52 pm 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
ahh very smart. that sounds excellent, a very useful script.

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
 Post subject: Re: custom sound at explosion. i need help
PostPosted: Sat Sep 29, 2012 12:08 pm 
Offline
User avatar

Joined: Tue Oct 04, 2011 2:44 pm
Posts: 294
also, is it possible to get a list of all functions possible? who made the functions?

_________________
“If you can't explain it simply, you don't understand it well enough” - Albert Einstein.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane