Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/single_player_map/scripts/falldown.lua @ 3947

Last change on this file since 3947 was 3945, checked in by snellen, 18 years ago

wrote prototype for prisoner, guard, secondguard

File size: 410 bytes
Line 
1
2randTime = 0
3eventFinished = false
4randinit = false
5
6function RandTime()
7
8if not randinit then
9math.randomseed(os.clock())
10randinit = true
11randTime = 10 * math.random()
12end
13end
14
15
16function fallDown(timestep)
17
18eventFinished = true
19end
20
21
22function tick(timestep)
23
24RandTime()
25
26if randTime > 0 then
27randTime = randTime - timestep
28else
29io.write("Falldown called \n")
30fallDown(timestep)
31end
32
33return eventFinished
34
35end
Note: See TracBrowser for help on using the repository browser.