Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
i tried figuring this out but not sure if this can be done but I wanna make my player run with I press a key, any help? |
||||
|
ccbRegisterKeyDownEvent http://www.ambiera.com/coppercube/doc/cnt_javascriptref.htmlccbRegisterKeyDownEvent ccbRegisterKeyDownEvent(funcstr) Note: This function is not available in the editor, and only in the Windows and Mac OS X app target. For getting key events, use the behavior functions onKeyEvent(). Registers a function for receiving a key down event. The function registered must take one parameter which will be the key code. Examples: ccbRegisterKeyDownEvent("keyPressedDown"); function keyPressedDown(keyCode) { print("A key was pressed down:" + keyCode); //In your case, call Run action. } Prints which key was pressed when it is pressed. |
||||
|
Thanks I'll try this out |
||||
|
Here you go, quick tutorial marshtownmadness.com/?page_id=362&preview=true @crackyourspeaker |
||||
|
Woops, here is the correct link http://marshtownmadness.com/runn... |
||||
|
Sweet thanks |
|