Page 1 of 1

Set the time limit

PostPosted: 24 Apr 2017, 15:38
by Oliver_Buo
03 zeit.JPG
it is not here to set a time limit ! where else ?


How can I set a time limit for a level.
In another level I have seen, which is set there a time limit.
Have unfortunately not figured out where you could adjust.
Cool would be if one could adjust still so a noise of a ticking clock.

01 Zeit.JPG
01 time

02 zeit.JPG
02 time

Re: Set the time limit

PostPosted: 24 Apr 2017, 18:32
by Jonathan
Hey,
Try this:
1. Find your level's STL file and open it in a text editor.
2. Scroll to the top, and find your first sector. It should look something like this:
{l Code}: {l Select All Code}
(sector
    (name "main")
    (music "music/chipdisko.ogg")
    (ambient-light 1 1 1)
    (background
      (speed 0.5)
      (image "images/background/semi_arctic.jpg")
    )
    (camera
      (mode "normal")
    )

3. Insert the following code after it:
{l Code}: {l Select All Code}
(leveltime
   (time 20)
)
with the time being the amount of time you want on the clock.
4. A clock should appear in the editor(like your screenshot) with the time you set on it.
Hope that helps!

Re: Set the time limit

PostPosted: 24 Apr 2017, 20:54
by Oliver_Buo
thank u
i try it but it did not work.

if i open level with editor looks a bit different...

Re: Set the time limit

PostPosted: 24 Apr 2017, 21:19
by brmbrmcar
You can still add that code. It is just that the new lines haven't been added correctly.

Re: Set the time limit

PostPosted: 24 Apr 2017, 23:53
by VNS
Notepad doesn't create the lines. Try something like Notepad++ or Atom (by GitHub)

Re: Set the time limit

PostPosted: 25 Apr 2017, 03:42
by Jonathan
Or Wordpad, or Microsoft Word if you have it.

Re: Set the time limit

PostPosted: 25 Apr 2017, 08:15
by brmbrmcar
gedit

Re: Set the time limit

PostPosted: 25 Apr 2017, 16:33
by GunChleoc
Or Geany - that's a nice cross-platform editor.

Re: Set the time limit

PostPosted: 25 Apr 2017, 17:12
by Oliver_Buo
Cool. Thank u all. :)

next problem. I have a labyrinth with 5 sectort. the goal is in sector 5 .
Actually the Level Time will only count in sector 1

any idea to get the "Level" time for the "Level" not only for sector "main" ? :think:

Re: Set the time limit

PostPosted: 27 Apr 2017, 14:27
by Jonathan
I don't think it's possible to set a time limit for the entire level. What you could do is set an individual time limit for each sector. Just add the code I showed above after each sector in the code. Just find in the code
{l Code}: {l Select All Code}
(sector
     (name "something")

and add the leveltime code for each sector. Hope I helped!

Re: Set the time limit

PostPosted: 28 Apr 2017, 19:09
by Oliver_Buo
@ Jonathan Yes i guess so.... i guess its better to include that in a new level :)