Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8675 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 4:24:52 PM (18 years ago)
Author:
snellen
Message:

copied movechopper.lua into src

Location:
branches/script_engine/src/lib/script_engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/movechopper.lua

    r8417 r8675  
     1targetOneReached = false
     2targetTwoReached = false
     3time = 0.0
     4
     5
    16function handleTrigger()
    27helo:moveUp(true)
    38end
     9
     10function invertTargetReached()
     11 targetReached = not targetReached
     12end
     13
     14
     15function tick(timestep)
     16 time = timestep+time
     17 heloYCoord = helo:getAbsCoorY()
     18 heloXCoord = helo:getAbsCoorX()
     19 heloZCoord = helo:getAbsCoorZ()
     20
     21--io.write(heloXCoord)
     22--io.write("\n")
     23
     24 if heloYCoord < 0 and not targetOneReached then
     25  heloYCoord = heloYCoord + 1*timestep
     26 else
     27  targetOneReached = true
     28 end
     29
     30 if targetOneReached then
     31  heloXCoord = heloXCoord + 10*timestep
     32 end
     33
     34 if heloXCoord > -1445 then
     35  heloYCoord = heloYCoord - 1*timestep
     36  heloXCoord = heloXCoord - 8*timestep
     37 end
     38
     39 if heloXCoord > -1440 then
     40  targetTwoReached = true
     41 end
     42
     43 if  heloYCoord < -18 and targetTwoReached then
     44  return true;
     45 end
     46
     47 helo:setAbsCoor(heloXCoord, heloYCoord ,heloZCoord)
     48 --if time < 1 and not targetReached then
     49 -- handleTrigger()
     50 --else
     51 -- helo:moveUp(false)
     52 --end
     53
     54 return false
     55
     56end
  • branches/script_engine/src/lib/script_engine/script.cc

    r8485 r8675  
    33#include "luaincl.h"
    44
     5#include "file.h"
    56
    67#include "loading/load_param.h"
Note: See TracChangeset for help on using the changeset viewer.