Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
how to do this thing

aiming_bullets
Guest
Quote
2016-10-26 18:50:02

how to create something like if a variable has a value then invoke action by using javascript?



using key event method.

when u press "F" key then a variable "google" will be created with value"1"

now i wanted that if "google" has value "1" then an action should be invoked.

how to do this all by using javascript any help would be appreciated..


erik
Registered User
Quote
2016-10-27 10:55:06

You can check for the content of a variable using ccbGetCopperCubeVariable(). You can then run your action using ccbInvokeAction(). This requires an actionid which is set into behaviors by CopperCube at runtime, so this means you can only run this from a behavior (which also only makes sense).


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (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