ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator Microsoft Copilot AI
person icon
guest_Robbo
Guest
Quote
2025-01-27 00:56:19

Just for fun tested out Microsoft's Copilot AI to write some Javascript code for Coppercube and I was surprised how close it got to working fine:

I just asked it to move a box and thats it - it wrote this for me:


var box = ccbGetSceneNodeFromName("Box");

// Function to move the box along the X-axis
function moveBox() {
var currentX = ccbGetSceneNodeProperty(box, "Position")[0];
var newX = currentX + 1; // Change this value to control the speed of movement
ccbSetSceneNodeProperty(box, "Position", newX, 0, 0);
}

// Call the moveBox function every frame
ccbRegisterOnFrameEvent(moveBox);


Turns out it uses the correct CC API's to write a function that does just that - the only issue was that ")[0];" does not work and if you change to ").x;" then works fine...

I told it to do this using ES5 2nd time over and it didnt change the code so still some teething issues but interesting even still I guess.....


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 |