Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

effects

Location:
data/branches/presentation
Files:
2 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
  • data/branches/presentation/worlds/sp_demo_mountain_lake.oxw

    r4091 r4095  
    2727     <file>effects.lua</file>
    2828     <function>tick</function>
    29      <abs-coor>0,100,0</abs-coor>
     29     <abs-coor>-1200,276,909</abs-coor>
    3030     <radius>10</radius>
    3131     <worldentity>Player</worldentity>
     
    4141    <Hover>
    4242      <name>Player</name>
    43       <abs-coor>50, 100, 50</abs-coor>
     43      <abs-coor>-1355, 281, 907</abs-coor>
    4444    </Hover>
    4545
Note: See TracChangeset for help on using the changeset viewer.