Set the time limit

Set the time limit

Postby Oliver_Buo » 24 Apr 2017, 15:38

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
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Set the time limit

Postby Jonathan » 24 Apr 2017, 18:32

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!
Jonathan
 
Posts: 59
Joined: 02 Nov 2015, 22:22

Re: Set the time limit

Postby Oliver_Buo » 24 Apr 2017, 20:54

thank u
i try it but it did not work.

if i open level with editor looks a bit different...
Attachments
level 9 editor.JPG
txt
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Set the time limit

Postby brmbrmcar » 24 Apr 2017, 21:19

You can still add that code. It is just that the new lines haven't been added correctly.
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: Set the time limit

Postby VNS » 24 Apr 2017, 23:53

Notepad doesn't create the lines. Try something like Notepad++ or Atom (by GitHub)
Hello there!
User avatar
VNS
 
Posts: 151
Joined: 30 Nov 2016, 21:40
Location: on a planet named Earth

Re: Set the time limit

Postby Jonathan » 25 Apr 2017, 03:42

Or Wordpad, or Microsoft Word if you have it.
Jonathan
 
Posts: 59
Joined: 02 Nov 2015, 22:22

Re: Set the time limit

Postby brmbrmcar » 25 Apr 2017, 08:15

gedit
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: Set the time limit

Postby GunChleoc » 25 Apr 2017, 16:33

Or Geany - that's a nice cross-platform editor.
User avatar
GunChleoc
 
Posts: 502
Joined: 20 Sep 2012, 22:45

Re: Set the time limit

Postby Oliver_Buo » 25 Apr 2017, 17:12

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:
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Set the time limit

Postby Jonathan » 27 Apr 2017, 14:27

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!
Jonathan
 
Posts: 59
Joined: 02 Nov 2015, 22:22

Re: Set the time limit

Postby Oliver_Buo » 28 Apr 2017, 19:09

@ Jonathan Yes i guess so.... i guess its better to include that in a new level :)
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Who is online

Users browsing this forum: No registered users and 1 guest

cron