Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/single_player_map/scripts/secondprisoner.lua @ 4066

Last change on this file since 4066 was 4051, checked in by snellen, 18 years ago

objects get added from within the script

File size: 468 bytes
RevLine 
[4051]1-- Get objects from orxonox
2thisscript:addObject("GenericNPC", "Secondprisoner")
3thisscript:addObject("FPSPlayer", "Player")
[3946]4
5-- Initialises the random number generator
6randinit = false
7function randInit()
8
9if not randinit then
10math.randomseed(os.clock())
11randinit = true
12end
13
14end
15
16
17function scream()
18
19end
20
21function tick(timestep)
22
23--io.write("Secondprisoner called \n")
24randInit()
25randNumber = 10 * math.random()
26
27if randNumber > 8 then
28scream()
29end
30
31return false
32end
Note: See TracBrowser for help on using the repository browser.