Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
timer script

william
Registered User
Quote
2015-10-08 20:57:26

Hello coders.

Is there somone who can make a visual timer script that halted at a certain time and counts f.e the score?


thanks in advance


erik
Registered User
Quote
2015-10-09 11:48:30

I'm not exactly sure how it should work, anything more specific? I think you can do this without a script, just use a "every few seconds do something" behavior to an object, and let it reduce a variable by one. Also, print that variable into a 2D Overlay in that behavior.


william
Registered User
Quote
2015-10-09 17:04:45

what i had in mind is a counter on the screen that for example counts from 0 to 500 when the time has stopped then checks a variable and act.


erik
Registered User
Quote
2015-10-10 05:01:13

Yes, just do it like described above. Create a variable, count it up in such a behavior, and add an "if variable has a value" action, which checks for that value and triggers the action you want to do. No need for scripting there.


pittie
Registered User
Quote
2015-10-10 18:47:25

Perhaps this little test can help.

The timer incease up to 10. Then the app exit. Here you could also ask for a variable.

https://www.dropbox.com/s/jeshbdado239ok6/timer%20test.ccb?dl=0


william
Registered User
Quote
2015-10-11 20:57:28

ok thank you for your help.
as soon as i get the programm working i will try this. at this moment coppercube will not start on my new pc (crash)


Create reply:


Posted by: (you are not logged in)


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