View Full Version : Damned sound problem.
Checksum
12-16-2003, 02:48 PM
selected:
source = GetSourceRef();
// Setup the meshes and models.
jkSetPOVModel(source, povModel);
jkSetWeaponMesh(source, weaponMesh);
SetArmedMode(source, 0);
jkSetWaggle(source, '10.0 7.0 0.0', 350);
mountsound=PlaySoundThing(mountSound, player, 1.0, -1, -1, 0x80);
// Clear saber flags, and allow activation of the weapon
jksetFlags(source, 0x5);
SetCurWeapon(source, 10);
Return;
Player is defined above as "player=getlocalplayerthing();" in startup: message.
What'll happen is the sound plays the first time you turn the saber on. For the rest of that game, it doesn't play. I have no idea why.
------------------
Duel Zero (http://forums.massassi.net/html/Forum5/HTML/010438.html) key count: Zero! Down to guns and forces. Expect a release soon.
Kievan Mereel
12-16-2003, 03:11 PM
Shouldn't you assign the mountsound in the symbols section?
symbols
sound mountSound=sound.wav
end
#==========================
code
selected:
source = GetSourceRef();
// Setup the meshes and models.
jkSetPOVModel(source, povModel);
jkSetWeaponMesh(source, weaponMesh);
SetArmedMode(source, 0);
jkSetWaggle(source, '10.0 7.0 0.0', 350);
PlaySoundThing(mountSound, player, 1.0, -1, -1, 0x80);
// Clear saber flags, and allow activation of the weapon
jksetFlags(source, 0x5);
SetCurWeapon(source, 10);
Return;
I got rid of the mountsound= before PlaySoundThing(mountSound, player, 1.0, -1, -1, 0x80);
Havn't tested, I'm at a comp without JK/MotS, but that seems like it should work.
------------------
In rememberance of MaDaVentor...one of the best Massassians out there.
Check out updates for my editing work at the Shadow Jedi Academy (http://www.geocities.com/shadow_jedi_academy).
[This message has been edited by Kievan Mereel (edited December 16, 2003).]
darthslaw
12-16-2003, 04:19 PM
Isn't 'source' in your 'selected' message the player? I could be wrong, but you're setting up internal meshes. If source is the player, just use source to play the sound.
------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing
Checksum
12-16-2003, 06:08 PM
Whoever pointed it out - GOOD call.
mountsound=playsoundthing(mountsound, player...
So mountsound is defined as the wav the first time, and the actual in-game sound the rest of the time.
------------------
Duel Zero (http://forums.massassi.net/html/Forum5/HTML/010438.html) key count: Zero! Down to guns and forces. Expect a release soon.
Kievan Mereel
12-17-2003, 10:54 AM
So...is it fixed?
------------------
In rememberance of MaDaVentor...one of the best Massassians out there.
Check out updates for my editing work at the Shadow Jedi Academy (http://www.geocities.com/shadow_jedi_academy).
darthslaw
12-17-2003, 01:14 PM
It sould be. Mountsound was both assigned as the sound wav AND the int dummy thing (mountsound = blahblahblah http://forums.massassi.net/html/wink.gif in the symbols section. It plays the sound, then assigns it to the mountsound var, overwriting the "whatever.wav" data stored in the variable. As long as they aren't the same name, it should work fine.
Oh, to help find these problems (and others, too), get a hold of Parsec and other stuff like Datamaster and Scribe at Sabersdomain (http://www.geocities.com/sabersdomain/).
------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing
[This message has been edited by Darth Slaw (edited December 17, 2003).]
lucky_jackpot
12-17-2003, 05:16 PM
I believe a "whoops - oh bugger, silly me" quote is applicable, in this situation http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/tongue.gif
As Slaw points out, it won't do to have them as the same name; for example
(minimal condensed version of script...)
symbols
int mountSnd=-1 local
sound mountSound=sound.wav
end
#
code
selected:
mountSnd = PlaySoundThing (mountSound, *other normal params*);
return;
end
This way you have a designated channel as an int data-type (and as a handle), whilst still being able to use the cog verb "PlaySoundThing()" with the sound wave you desire http://forums.massassi.net/html/smile.gif
Hope this has helped http://forums.massassi.net/html/biggrin.gif
-Jackpot
PS: As much as the DataMaster is invaluable for verbs and flags, as I'm sure you're well aware Checksum http://forums.massassi.net/html/smile.gif, I feel I must second Slaw's mention of "Parsec" for debugging http://forums.massassi.net/html/biggrin.gif Chances are high that it would have picked up on this... http://forums.massassi.net/html/smile.gif
------------------
"lucky_jackpot is the smily god..." - gothicX
"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
Checksum
12-18-2003, 04:11 PM
Yeah, I just can't get Parsec to work for some reason.
Problem solved, though.
------------------
Duel Zero (http://forums.massassi.net/html/Forum5/HTML/010438.html) key count: Zero! Down to guns and forces. Expect a release soon.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.