ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > CopperCube Open discussion
forum topic indicator ccbPlaySound not working?
person icon
guest_Guest
Guest
Quote
2026-02-22 17:53:39

Hello, I'm currently trying to create a script for a custom action, it should play a sound when the character's mouse is over the scenenode "tapeRecorder". I've tested it out, but it doesn't play the audio. It doesn't return any sort of error message in the debug menu, and I believe it might have something to do with where the file is.
Here is the code.

/*
<action jsname="action_InteractButtonAudio" description="Interact With Audio">
</action>
*/
action_InteractButtonAudio = function()
{
};

action_InteractButtonAudio.prototype.execute = function(currentNode)
{
var mouseX = ccbGetMousePosX();
var mouseY = ccbGetMousePosY();
var note = ccbGetSceneNodeFromName("tapeRecorder");
var mouse3DPos = ccbGet3DPosFrom2DPos(mouseX, mouseY);
var camera3DPos = ccbGetSceneNodeProperty(ccbGetActiveCamera(), "Position");

if (ccbDoesLineCollideWithBoundingBoxOfSceneNode(note, camera3DPos.x, camera3DPos.y, camera3DPos.z, mouse3DPos.x, mouse3DPos.y, mouse3DPos.z))
{
ccbPlaySound("Tape.wav");
}
}


person icon
guest_Guest
Guest
Quote
2026-02-22 18:40:46

I think the file was just corrupted.
Whoops!


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |