Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Damned sound problem.
Damned sound problem.
2003-12-16, 11:48 AM #1
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);

   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 key count: Zero! Down to guns and forces. Expect a release soon.
2003-12-16, 12:11 PM #2
Shouldn't you assign the mountsound in the symbols section?
Code:
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.

[This message has been edited by Kievan Mereel (edited December 16, 2003).]
2003-12-16, 1:19 PM #3
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
May the mass times acceleration be with you.
2003-12-16, 3:08 PM #4
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 key count: Zero! Down to guns and forces. Expect a release soon.
2003-12-17, 7:54 AM #5
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.
2003-12-17, 10:14 AM #6
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.

------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing

[This message has been edited by Darth Slaw (edited December 17, 2003).]
May the mass times acceleration be with you.
2003-12-17, 2:16 PM #7
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...)
Code:
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)
"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"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-12-18, 1:11 PM #8
Yeah, I just can't get Parsec to work for some reason.

Problem solved, though.

------------------
Duel Zero key count: Zero! Down to guns and forces. Expect a release soon.

↑ Up to the top!