Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 4, 2006, 2:24:48 PM (18 years ago)
Author:
hdavid
Message:

effects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/presentation/scripts/effects.lua

    r4091 r4095  
    1010-- Global Variables
    1111fogActivated = false
    12 RainActivated = false
    13 SnowActivated = false
    14 LightningActivated = false
    15 CloudActivated = false
     12rainActivated = false
     13snowActivated = false
     14lightningActivated = false
     15cloudActivated = false
    1616
    1717function tick(timestep)
    1818
    19 io.write("script begin\n")
     19playerX = Player:getAbsCoorX()
     20playerY = Player:getAbsCoorY()
     21playerZ = Player:getAbsCoorZ()
    2022
    21 cloud:skyColor(1, 0, 0, 15)
     23if playerX > -1200 and not cloudActivated then
     24  cloud:activate()
     25  cloudActivated = true;
     26end
    2227
     28if playerX > -1100 and cloudActivated then
     29  cloud:cloudColor(1,0,0,5)
     30  cloud:skyColor(0.5,0.5,0.5,5)
     31end
    2332
     33if playerX > -1000 and cloudActivated then
     34  cloud:cloudColor(0.8,0.8,0.8,5)
     35  cloud:skyColor(0,0,0.8,5)
     36end
    2437
    25 io.write("scipt end\n")
     38if playerX > -500 then
     39  io.write("script end\n")
     40  return true
     41end
    2642
    27 return true
     43return false
    2844
    2945end
Note: See TracChangeset for help on using the changeset viewer.