Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
add two scores

suk
Guest
Quote
2023-12-31 14:55:52

how can I add two values to get the result thanks


o139
Registered User
Quote
2023-12-31 16:13:19

with javascript its possible


suk
Guest
Quote
2023-12-31 17:11:52

thanks do you know where I can find an example thank you very much


o139
Registered User
Quote
2023-12-31 17:48:45

i did not find any examples so i made one

add this script with every 1 ms or on action and use execute javascript

note change the variable to your own names

this will change the variable score with the amount of score1 and score2

score1 = ccbGetCopperCubeVariable("score1");
score2 = ccbGetCopperCubeVariable("score2");

score1 = Number(score1);
score2 = Number(score2);

scorefin = score1+score2;


ccbSetCopperCubeVariable("score", scorefin);



Create reply:


Posted by: (you are not logged in)


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