Data Realms Fan Forums http://45.55.195.193/ |
|
impact sounds? http://45.55.195.193/viewtopic.php?f=1&t=20312 |
Page 1 of 1 |
Author: | pileup [ Wed Nov 24, 2010 9:00 pm ] |
Post subject: | impact sounds? |
Is there any way to add sounds to weapons or items so when they drop they make a noise? As if i dropped i grenade it would make a metal click noise. Possible? or just a dream? I mean it makes a noise when it comes in contact with the floor. |
Author: | Roast Veg [ Wed Nov 24, 2010 9:15 pm ] |
Post subject: | Re: impact sounds? |
This is perfectly possible with Lua, but only for the grenade. Not the gun. |
Author: | pileup [ Wed Nov 24, 2010 9:19 pm ] |
Post subject: | Re: impact sounds? |
dammit! I was afraid someone was gonna say that! Well i was thinking about making some of the throwable items from dead rising 2 such as cooking oil and other novelty items, yet i wanted to add it to weapons as well without lua, as lua's my weakpoint! are there any other possible ways to work around this method? |
Author: | Roast Veg [ Wed Nov 24, 2010 9:26 pm ] |
Post subject: | Re: impact sounds? |
This isn't going to happen the way you want it to without Lua, but using an AEmitter you might be able to work the gun. |
Author: | pileup [ Wed Nov 24, 2010 9:44 pm ] |
Post subject: | Re: impact sounds? |
i see what your thinking yet im not fully there. Could you explain in a bit more depth for those with less knowledge? |
Author: | Roast Veg [ Wed Nov 24, 2010 9:56 pm ] |
Post subject: | Re: impact sounds? |
Hmm... Code: function Update(self) if self.Pos.Y <= SceneMan:FindAltitude(self.Pos,0,0) then AudioMan:PlaySound("Folder.rte/File.wav"); self:GibThis; end end That would [hopefully] work on a TDExplosive. Still thinking about the gun, though. |
Author: | pileup [ Wed Nov 24, 2010 10:12 pm ] |
Post subject: | Re: impact sounds? |
Thanks for that code! and thanks for giving me suggestions! |
Author: | Roast Veg [ Wed Nov 24, 2010 10:17 pm ] |
Post subject: | Re: impact sounds? |
Yea I'm just hoping it works. |
Author: | pileup [ Wed Nov 24, 2010 10:36 pm ] |
Post subject: | Re: impact sounds? |
tried the script. Unfortunatley it crashes cc with no error line! Thanks for trying though! |
Author: | Grif [ Thu Nov 25, 2010 12:46 am ] |
Post subject: | Re: impact sounds? |
playsound doesn't work; you'll have to create an emitter that plays your sound |
Author: | Roast Veg [ Thu Nov 25, 2010 12:47 am ] |
Post subject: | Re: impact sounds? |
Damn, didn't realise that. Do as Grif says, he knows more than I. |
Author: | pileup [ Thu Nov 25, 2010 8:21 pm ] |
Post subject: | Re: impact sounds? |
Sorry to ask but how would i go about modifying a aemitter to only play the sound on impact? |
Author: | Roast Veg [ Thu Nov 25, 2010 11:22 pm ] |
Post subject: | Re: impact sounds? |
Right, here you need a sound particle, and an AEmitter to emit said sound particle, but you only want said sound particle to be emitted upon hitting terrain. Effectively, it's the script above, but replace the playsound and the gibthis with the command for beginning the emission. |
Author: | Coops [ Fri Nov 26, 2010 6:57 am ] |
Post subject: | Re: impact sounds? |
Roast that made little to no sense at all.. What you need to do is make your Emitter, Make it emit something that doesnt matter or affect anything seriously (Air Blast for ex.) and give the emitter a play sound for when it emits something. Next is use the Script above to create the Emitter for when it hits the ground and thats basically all you need to do. To give the Emitter a sound to play for when it emits is put this anywhere in the Emitter's code. Code: EmissionSound = Sound AddSample = ContentFile Path = "Sound Path" That should be it, Good luck. |
Author: | Commodore111 [ Sat Nov 27, 2010 6:44 am ] |
Post subject: | Re: impact sounds? |
You could check the velocity and emit the sound when the velocity drops rapidly. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |