Project X Forums
http://px.worms2d.info/forum/

custom sound at explosion. i need help
http://px.worms2d.info/forum/viewtopic.php?f=15&t=491
Page 1 of 1

Author:  Twicken [ Wed Sep 26, 2012 3:52 pm ]
Post subject:  custom sound at explosion. i need help

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?

Author:  StepS [ Wed Sep 26, 2012 4:53 pm ]
Post subject:  Re: custom sound at explosion. i need help

this can be done in weapon table editor, SOUND button

Author:  Twicken [ Thu Sep 27, 2012 1:25 am ]
Post subject:  Re: custom sound at explosion. i need help

yeah except i want to use a non-native sound, could i use a sound overwriting script?

Author:  Twicken [ Thu Sep 27, 2012 1:48 am ]
Post subject:  Re: custom sound at explosion. i need help

//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

Author:  StepS [ Thu Sep 27, 2012 1:10 pm ]
Post subject:  Re: custom sound at explosion. i need help

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.

Author:  Twicken [ Thu Sep 27, 2012 2:42 pm ]
Post subject:  Re: custom sound at explosion. i need help

hmm ok well i guess ill have to live with a soundless hell grenade lol.

Author:  StepS [ Fri Sep 28, 2012 11:24 am ]
Post subject:  Re: custom sound at explosion. i need help

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 ;)

Author:  Twicken [ Fri Sep 28, 2012 12:52 pm ]
Post subject:  Re: custom sound at explosion. i need help

ahh very smart. that sounds excellent, a very useful script.

Author:  Twicken [ Sat Sep 29, 2012 12:08 pm ]
Post subject:  Re: custom sound at explosion. i need help

also, is it possible to get a list of all functions possible? who made the functions?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/