ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator add two scores
person icon
suk
Guest
Quote
2023-12-31 14:55:52

how can I add two values to get the result thanks

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

with javascript its possible

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

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

person icon
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:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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