Game mission time

Hey guys, I want to make mission time , for example if my character doesnt collect items per 3 minute - Game over… I would like to use logic bricks - Is it possible? if no, can anyone to post a script? Thx :slight_smile:

You could use a timer variable, and check to see if it’s above 180 seconds - if so, then switch to the ‘Game Over’ scene or set an overlay scene and set your player to another state to stop moving.

EDIT: If you wanted to restart, remove the overlay scene and restart the main game scene.

As always, in comes SolarLune with great advice (wanted to say a quick thanks for all the threads that you’ve answered that have really helped me in my quest to learn blender).

Anyway, just wanted to give you this link in case you weren’t sure how to do this:

This is a great tutorial showing how to do this. In fact, parts 1-3 are all very good tutorials covering everything from creating and animating a character to using a good variety of logic bricks.

I agree with OhSkyCake, SolarLune is one of those persons who helped me most during Blender GE learning… :slight_smile:

SolarLune, Im still kinda noob in Blender GE , can you tell me there exactly I can find “Timer” variable? I cant get it, is it somewhere in logic bricks or its variable in Python? Sadly but my knowledge in Python programming is… :confused:

It’s actually a game property. Look to the left of the logic bricks and click “Add game property”. Then in the new property’s drop down menu for its type, select “Timer”.

Also, in case you’re not sure where to go from there, add a sensor of type “Property” and select your Timer, then change “Evaluation Type” to “Interval” (cant get equal to work for some reason). Then make your min interval the time you want (180 for 3 min) and just set your max a second above that or something. Link that up to an “And” controller and a “Scene” actuator and you can use that to change scenes or restart or whatever you want after the interval. If you want to have a load scene or cut scene between running out of time and restarting, check the tutorial I linked to earlier.

Thx, OhSkyCake, at last found out it :slight_smile: There are cut scenes and some other stuff which I know in tutorial, I still need time counter in game. The logic part is done with timer… , do you know how to show up it visually in game? :slight_smile: I mean for example just simple numbers counting down…

Yeah, by using a HUD, here is a tutorial. Text is more of a pain to implement than you would expect.

Also, here is a tutorialon how to make your own fonts, and also goes over text in the game engine.

OhSky got to the problem quickly - he is correct, though. Text is a bit difficult to implement, though once you’ve got a nice text image and setup, though, you can save and re-use the texture in different projects. Anyway, you’re welcome for the help - thanks.