Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/script_engine/src/movechopper.lua @ 8493

Last change on this file since 8493 was 8487, checked in by snellen, 18 years ago

comented debug output

File size: 957 bytes
Line 
1targetOneReached = false
2targetTwoReached = false
3time = 0.0
4
5
6function handleTrigger()
7helo:moveUp(true)
8end
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 + 0.01
26 else
27  targetOneReached = true
28 end 
29
30 if targetOneReached then
31  heloXCoord = heloXCoord + 0.1
32 end
33
34 if heloXCoord > -1445 then
35  heloYCoord = heloYCoord - 0.01
36  heloXCoord = heloXCoord - 0.08
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
Note: See TracBrowser for help on using the repository browser.