Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone know how to add a sound to an object?
#1
Either as a client side or server side would be great. I'm trying to add a looping engine run sound to object/ship/player/player_basic_hutt_light.iff, so that when I call it from the datapad to fart around in it won't be dead silent.

I tried a few things, in c++ and lua, but have not had any luck. Even added a child object in its lua file causes the client to crash when its called (tried it with the droid detection device, as it's noisy).
Legend of Hondo - A Single Player SWGEmu based ... science project? Smile
My SWGs Files - https://mega.nz/#F!nUMwRSAI!S35daVC46CcEX9PQKmWr-g
http://www.tpot.ca - SWG Mods and Information

 
Reply
#2
Unsure about the trigger system, but in theory, you simply attach a .CDF in your Object file (SHOT FORM, look for the 'clientDataFile' XXXX chunk, set the byte after the '00' string end to '01' and then link to a .CDF.

[Image: MwFi3WP.png]


In case you want to use the template to easily edit that chunk:
Code:
// clientDataFile
// META(CHUNKID:XXXX)

String[Chunk Name]
Byte[on/off type toggle]
String[CDF Path]

There are a couple of sound chunk types for CDF, but the most typical one used in cases like this would be 'ASND', which just contains a path to a SND. If you make an ASND in it or use an existing one with one, you can simply use my templates that I already put up in the SIE thread to easily edit it.

This would be it:

[Image: PTx11cw.png]

Best is to look at existing object/soundobject of how they operate.

I've never tested it myself, but it should be simple enough. Smile
 
Reply
#3
Wow, never thought I would say this but... I prefer C++ over the crazy mess that you just explained and I loathe the crazy mess that is C++! lol... Thanks for explaining it though. I will see what I can do and if it works, I will share.
Legend of Hondo - A Single Player SWGEmu based ... science project? Smile
My SWGs Files - https://mega.nz/#F!nUMwRSAI!S35daVC46CcEX9PQKmWr-g
http://www.tpot.ca - SWG Mods and Information

 
Reply
#4
It'll be more streamlined/straightforward once I got an editor out for both (next update probably). Smile
 
Reply
#5
(2015-07-06, 07:30 AM)tatwi Wrote: Wow, never thought I would say this but... I prefer C++ over the crazy mess that you just explained and I loathe the crazy mess that is C++! lol... Thanks for explaining it though. I will see what I can do and if it works, I will share.

It's just type[name], how is that a crazy mess? You could barely define a simpler syntax than that... Sad
 
Reply
#6
(2015-07-06, 08:08 PM)Sytner Wrote:
(2015-07-06, 07:30 AM)tatwi Wrote: Wow, never thought I would say this but... I prefer C++ over the crazy mess that you just explained and I loathe the crazy mess that is C++! lol... Thanks for explaining it though. I will see what I can do and if it works, I will share.

It's just type[name], how is that a crazy mess? You could barely define a simpler syntax than that... Sad
SOE's system of where things are and what they're attached to, blah, blah, etc., not your tool. Smile

Incidentally, I was able to add a sound into the client data file just fine, but interestingly it would only play while in the ship if I was in a space zone (tested with space_tatooine). When I was in a planet zone it would play the sound, but mute it while in the ship and when I got out of the ship the sound would restart and loop forever, yet that didn't happen in the space zone.

Anyhow, I don't care enough to dick around with it further. lol...
Legend of Hondo - A Single Player SWGEmu based ... science project? Smile
My SWGs Files - https://mega.nz/#F!nUMwRSAI!S35daVC46CcEX9PQKmWr-g
http://www.tpot.ca - SWG Mods and Information

 
Reply
#7
(2015-07-06, 07:30 AM)tatwi Wrote: SOE's system of where things are and what they're attached to, blah, blah, etc., not your tool. Smile

Oh right sorry, I must have misread. Since we're on the topic though the template system doesn't really work for object templates... people should bug Timbab to finish the editor for it Smile.
 
Reply
  



Forum Jump:


Browsing: 1 Guest(s)