Changeset 8675 in orxonox.OLD for branches/script_engine
- Timestamp:
- Jun 21, 2006, 4:24:52 PM (18 years ago)
- 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 1 targetOneReached = false 2 targetTwoReached = false 3 time = 0.0 4 5 1 6 function handleTrigger() 2 7 helo:moveUp(true) 3 8 end 9 10 function invertTargetReached() 11 targetReached = not targetReached 12 end 13 14 15 function 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 56 end -
branches/script_engine/src/lib/script_engine/script.cc
r8485 r8675 3 3 #include "luaincl.h" 4 4 5 #include "file.h" 5 6 6 7 #include "loading/load_param.h"
Note: See TracChangeset
for help on using the changeset viewer.