Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi guys, this forum does not allow me to upload images, so I linked my problem on my forum. Trying to get multiplayer working but for some reason, this code returns void(0) when I print in exe ---------------------- ccbRegisterMouseDownEvent("mousePressedDown"); function mousePressedDown(button) { print("A mouse button was presssed down:" + button); } --------------------- @niko http://marshtownmadness.com/acti... |
||||
|
Ok so I discovered this code here --------------------- behavior_multiPlayer.prototype.onMouseEvent = function(mouseEvent, mouseWheelDelta) { if (mouseEvent == 1) { print("yes"); } } ----------------------- But it does not work, nothing happens when I click the left mouse button Took this code from http://www.ambiera.com/coppercub... |
||||
|
Tried this aswell ------------------- behavior_multiPlayer.prototype.onMouseEvent = function(mouseEvent) { if(mouseEvent == 3) { print("yes"); } } ----------------------- Nothing |
||||
|
It may be that "print" does not work with behaviors... Can someone clarify this? @niko I ran a test with print, in other parts of the code, like onAnimate and it did not print |
||||
|
Print will not work in the exe. It is only for running in the editor and debug(test) mode. print(text) Prints a string into the output window of the editor or into the debug console window of the app. It doesn't work in the final product of the app (EXE). |
|