Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/presentation/scripts/effects.lua @ 4103

Last change on this file since 4103 was 4103, checked in by hdavid, 18 years ago
File size: 1.3 KB
Line 
1-- Get objects from orxonox
2thisscript:addObject("FogEffect", "fog")
3thisscript:addObject("RainEffect", "rain")
4thisscript:addObject("SnowEffect", "snow")
5thisscript:addObject("LightningEffect", "lightning")
6thisscript:addObject("CloudEffect", "cloud")
7
8thisscript:addObject("Hover", "Player")
9
10-- Global Variables
11fogActivated = false
12rainActivated = false
13snowActivated = false
14lightningActivated = false
15cloudActivated = false
16
17function tick(timestep)
18
19playerX = Player:getAbsCoorX()
20playerY = Player:getAbsCoorY()
21playerZ = Player:getAbsCoorZ()
22
23
24--if playerX > -1200 and not cloudActivated then
25  --cloud:activate()
26  --cloudActivated = true;
27--end
28
29
30--if playerX > -900 and not fogActivated then
31--  fog:activate()
32--  fogActivated = true
33--end
34
35--if playerX > -800 and not snowActivated then
36--  snow:activate()
37--  snowActivated = true
38--end
39
40--if playerX > -700 and snowActivated then
41--  snow:deactivate()
42--  fog:deactivate()
43--end
44
45--if playerX > -600 and not rainActivated then
46  --rain:startRaining()
47  --rainActivated = true
48--end
49
50--if playerX > -500 and rainActivated and not lightningActivated then
51--  lightning:activate()
52--  lightningActivated = true
53--end
54
55--if playerX > -300 and rainActivated then
56  --rain:stopRaining()
57  --lightning:deactivate()
58--end
59
60--return false
61return true
62end
Note: See TracBrowser for help on using the repository browser.