Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
timer

babis
Registered User
Quote
2017-02-18 11:08:27

Hello!
Is there a way to a put a timer in my game?
Lets say the goal of the player is to collect some objects but in a certain period of time. If time passes then the game will stop.


just_in_case
Moderator
Quote
2017-02-18 12:56:14

Yes that is possible... You can use javascript for that or can set every few seconds do someyhing and then..

On every 1000 ms set a variable..

Variable name = seconds

Add

Value = 1

And then execute if a variable has a value..

Seconds
Value more than 10
Then do something.
Execute your action..

And to draw time on screen you can usr every few seconds do something..

Every 100 ms

Change 2d overlay text..

Select a 2d overlay...

And change it text to $seconds$


Thats all... Hope you understand..


babis
Registered User
Quote
2017-02-18 13:26:01

Perfect!!!!! Thank you very much!!!!


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