Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Unstoppable ghost functions

Robo
Guest
Quote
2019-10-04 09:14:57

There must be some serious bug to CopperCube or something I am doing wrong...

I run a function to change the cursor, then stop it, all good then change scenes and it automatically starts up again - WTF !!

I never asked it to run again yet it does...and I have noticed that it is very unstable, with it working sometimes and not at others...totally adhoc with no rhyme or reason. Why would it restart up by itself and why not at least be consistent ??

The code is here:
(I added in the 'nu' change so I can see when it is running and when not)

// new cursor

ccbSetCursorVisible(false);
var nu = 0;

function onFrameDrawing() {

var mouseX = ccbGetMousePosX();
var mouseY = ccbGetMousePosY();
ccbDrawTextureRectangleWithAlpha("tex/cursor.png", mouseX-20, mouseY-20, mouseX+20, mouseY+20);
nu++;
print("on: " + nu);
}
ccbRegisterOnFrameEvent(onFrameDrawing);


HELP NEEDED !!


chenhongye
Registered User
Quote
2019-10-05 16:12:28

You can add a switch variable to control it.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

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


   






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