[Make it easier] Time in the game

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Continuing the theme of how to make things easier.

    The second task:

    If we pressed ''Space'' a new sprite appears on the screen after one second, then it moves up (after 1sec), then to the right and then it's destroyed (after one second too). If we press �Space� again, the loop is repeated.

    I know three ways of how to create time countdown in the game that lets you manipulate objects.

    Method 1 (Variable)

    <img src="http://i50.tinypic.com/34yslxu.jpg">

    Time is created using Global variable.

    Method 2 (Function)

    <img src="http://i49.tinypic.com/29aply8.jpg">

    Time is created using the Function object.

    Method 3. (Animation)

    <img src="http://i48.tinypic.com/10fs1fn.jpg">

    <img src="http://i49.tinypic.com/15f6ij9.jpg"><img src="http://i50.tinypic.com/aa7q6p.jpg">

    There is a sprite in the scene named �Controller� with animation, and time counts due to this animation (1 frame per second).

    All 3 methods are absolutely working. By default, the sprite has enabled Destroy on startup attribute, therefore it's destroyed after run the application.

    If you know more simple and correct methods of creation time in the game, please write them in this topic.

  • Well there's the timeline object.

    Ill see if I cant make a cap that demonstrates.

  • Well there's the timeline object.

    Ill see if I cant make a cap that demonstrates.

    Oops! I didn't know about it... Is it a new object?

    I've tried to use it, but don't understand how to work with it...

    If you know could you make an example?

  • Here ya go

    http://dl.dropbox.com/u/666516/timelineasy.cap

    Guess the hardest part to figure out is how to edit it on the object side of the editor.

  • <img src="http://i48.tinypic.com/33z8gsy.png">

    Is this easier? It certainly takes fewer events and you don't need a function or timeline object.

  • <img src="http://i48.tinypic.com/33z8gsy.png">

    Is this easier? It certainly takes fewer events and you don't need a function or timeline object.

    That actually would not work unless you pressed the button right at the start of the layout. you would have to reset time to 0 in the on space pressed event to make it work. but other than that it seems like the bets solution.....

  • newt

    Thank you for the example. It helped me to understand Timeline object and I can already use it in my games. I've changed it a little:

    <img src="http://i47.tinypic.com/2ykxb3q.jpg">

    <img src="http://i47.tinypic.com/2db8n79.jpg">

    deadeye

    Great solution to create time in the application using Timedelta. The only thing I changed the private variable to global, because PV works only if the object already exists in the scene. But it must appear only after one second.

    <img src="http://i47.tinypic.com/2nlwvpd.jpg">

    Thank you all!

    If someone knows other ways of how to control time � write here!

  • [quote:36givdgd]But it must appear only after one second.

    Oh hehe, guess I missed that part. Anyway, carry on.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That actually would not work unless you pressed the button right at the start of the layout. you would have to reset time to 0 in the on space pressed event to make it work. but other than that it seems like the bets solution.....

    heh Mary jane already fixed that.

    Just set the variable when you press space.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)