Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2014, 3:28:28 PM (11 years ago)
Author:
smerkli
Message:

Some cleanups, added a "change look" command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController/data/gui/scripts/testscript.lua

    r10065 r10066  
    2020  -- Move to the starting point at (xl+3000,yl,zl) while looking
    2121  -- at xl,yl,zl over the time span of 3 seconds
    22   ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 3, 0)
     22  ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 1, 0)
    2323
    2424  -- From there, perform a rotation around the harvester placed there
     
    2929    yt = math.sin(t)
    3030
    31     ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, 3*dt, 3*t+2.9)
     31    ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, dt, t+0.9)
    3232  end
    3333
    3434  -- Update absolute time
    35   Tabs = 3*math.pi + 2.9
     35  Tabs = math.pi + 0.9
    3636
    3737  -- Move away again, still looking at the station
    3838  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3, Tabs+0.4)
    3939
     40  -- Update absolute time
     41  Tabs = Tabs + 0.4 + 3
     42
     43  -- Transition the look from (xl,yl,zl) to (3500,0,0) in 3 seconds
     44  ctrl:eventScheduler("chl", xl, yl, zl, 3500, 0, 0, 3, Tabs)
    4045
    4146end
Note: See TracChangeset for help on using the changeset viewer.