Author Topic: Stuck  (Read 2809 times)

Balls, I will just look at vechile stereo.

EDIT: Ugh what am I looking for?
I searched "Vehicle Stereo" in add-ons which got me this link. http://forum.blockland.us/index.php?topic=253994.0

The OP links to the add-on, located here:
http://www.mediafire.com/download/qugmc7rabm6fxi7/Script_VehicleStereo.zip

I searched "Vehicle Stereo" in add-ons which got me this link. http://forum.blockland.us/index.php?topic=253994.0

The OP links to the add-on, located here:
http://www.mediafire.com/download/qugmc7rabm6fxi7/Script_VehicleStereo.zip

I got the file. I'm looking at the code. I just don't know which part of the code is the Audio emitter.

For this method, you don't use an audio emitter.

ShapeBase::playAudio(slot,datablock);
ShapeBase::stopAudio(slot);

I just wish we had something like this for GameConnections. :(

For this method, you don't use an audio emitter.

ShapeBase::playAudio(slot,datablock);
ShapeBase::stopAudio(slot);

I just wish we had something like this for GameConnections. :(

FINALLY! Thanks Chrono. So I would need to set datablocks, as well as slots ok this became easier.

EDIT: Ok, how do I set the slots?
« Last Edit: July 05, 2014, 08:06:38 PM by Quinn Mallory »

FINALLY! Thanks Chrono. So I would need to set datablocks, as well as slots ok this became easier.

EDIT: Ok, how do I set the slots?
The slots are just so you can play multiple sounds simultaneously.
I imagine you'd want to use a higher number to avoid possible conflicts, like 7 or 8.

Basically if you play a sound on slot 7, that sound will play until:
-The sound ends and isn't set to loop
-Another sound plays on that slot
-::stopAudio(slot) is called on that slot

The slots are just so you can play multiple sounds simultaneously.
I imagine you'd want to use a higher number to avoid possible conflicts, like 7 or 8.

Basically if you play a sound on slot 7, that sound will play until:
-The sound ends and isn't set to loop
-Another sound plays on that slot
-::stopAudio(slot) is called on that slot

Ok, I'm rather lost. Can you give an example on what the code might be?

Ok, I'm rather lost. Can you give an example on what the code might be?
Apparently only slots 0-3 work.
I suppose 3 would be the safest bet to avoid conflicts with other mods.
%obj.playAudio(3,musicData_Rock);

Apparently only slots 0-3 work.
I suppose 3 would be the safest bet to avoid conflicts with other mods.
%obj.playAudio(3,musicData_Rock);
Right, ok. What if I use AudioProfile? Would the format be: %obj.playAudio(3, AudioProfile(Synth_3));

Right, ok. What if I use AudioProfile? Would the format be: %obj.playAudio(3, AudioProfile(Synth_3));
AudioProfile isn't a function, it's a type of datablock. Correct usage in that case would be:
%obj.playAudio(3,Synth_3_Sound);

AudioProfile isn't a function, it's a type of datablock. Correct usage in that case would be:
%obj.playAudio(3,Synth_3_Sound);

I'm a bit stuck. When I use:

Code: [Select]
datablock AudioProfile(sfx_Trigger)
{
          filename = "./sfx_Trigger.wav";
          description = TC_Trigger;
          preload = false;
}

It gives a error when it trys to register in events. Is there a work around for it to register the sound? I got the audio description written.
« Last Edit: July 06, 2014, 05:55:29 PM by Quinn Mallory »

TC_Trigger is an existing AudioDescription, right?

TC_Trigger is an existing AudioDescription, right?

It's part of TCcore.

I'll make due what the vanilla blockland has. Chrono. Your the man. I will go to you if I have any question, like right now.
« Last Edit: July 06, 2014, 11:50:24 PM by Quinn Mallory »

I'll make due what the vanilla blockland has. Chrono. Your the man. I will go to you if I have any question, like right now.

Lmfao. Looks like Chrono accidentally got an apprentice.