Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 4, 2006, 12:55:44 AM (18 years ago)
Author:
bensch
Message:

orxonox/data/trunk: merged the single_player_map back.
merged with command:
svn merge https://svn.orxonox.net/data/branches/single_player_map . -r624:HEAD
no conflicts, that mattered (all merged to the favour of the branche)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/trunk/scripts/guard.lua

    r4064 r4080  
     1-- Get objects from orxonox
     2thisscript:addObject("GenericNPC","guard")
     3thisscript:addObject("FPSPlayer", "Player")
     4
    15-- Global Variables
    26walkingRouteOne = true   -- True if thestranger is walking route one
     
    48playerInLock = false
    59hangarReached = false
    6 
    7 height = 29
     10guardStopped = false
     11
     12height = 34
    813
    914-- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
     
    1419
    1520function observePlayer()
     21
     22guardX = guard:getAbsCoorX()
     23guardY = guard:getAbsCoorY()
     24guardZ = guard:getAbsCoorZ()
     25
    1626playerX = Player:getAbsCoorX()
    1727playerY = Player:getAbsCoorY()
    1828playerZ = Player:getAbsCoorZ()
    1929
    20 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then
     30
     31distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ)
     32
     33if distance > 250 and hangarRouteProgrammed and not guardStopped then
     34 guard:stop()
     35 guardStopped = true
     36end
     37
     38if distance < 250 and hangarRouteProgrammed and guardStopped then
     39 guard:resume()
     40 guardStopped = false
     41end
     42
     43if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 200 then
    2144playerInLock = true
    2245end
     
    84107
    85108if not exitRouteProgrammed then
    86 guard:walkTo( 162.096558, height, 274.944366)
    87 guard:walkTo( 161.519516, height, 286.673370)
    88 guard:walkTo( 161.098618, height, 295.228699)
    89 guard:walkTo( 160.568466, height, 306.004486)
    90 guard:walkTo( 160.151169, height, 314.486572)
    91 guard:walkTo( 159.416641, height, 324.925232)
     109--guard:runTo( 162.096558, height, 274.944366)
     110--guard:runTo( 161.519516, height, 286.673370)
     111--guard:runTo( 161.098618, height, 295.228699)
     112--guard:runTo( 160.568466, height, 306.004486)
     113guard:runTo( 160.151169, height, 314.486572)
     114guard:runTo( 159.416641, height, 324.925232)
    92115guard:walkTo( 158.700073, height, 335.108154)
    93116guard:walkTo( 157.943298, height, 345.862610)
     
    123146
    124147if not hangarRouteProgrammed and playerInLock then
    125 guard:walkTo( 138.422943, height, 504.832733)
    126 guard:walkTo( 188.685089, height, 509.034851)
    127 guard:walkTo( 259.451904, height, 515.326111)
    128 guard:walkTo( 351.655762, height, 519.210571)
    129 guard:walkTo( 495.821381, height, 517.551392)
    130 guard:walkTo( 650.267029, height, 516.826843)
    131 guard:walkTo( 752.277100, height, 506.265289)
    132 guard:walkTo( 780.652405, height, 397.283752)
    133 guard:walkTo( 780.212830, height, 317.386017)
    134 guard:walkTo( 778.699158, height, 241.875305)
    135 guard:walkTo( 776.305542, height, 120.869957)
    136 guard:walkTo( 774.626343, height, 26.204597)
    137 guard:walkTo( 773.148804, height, -30.654911)
    138 guard:walkTo( 771.164978, height, -106.990250)
    139 guard:walkTo( 756.719971, height, -197.656296)
    140 guard:walkTo( 730.690796, height, -269.808075)
    141 guard:walkTo( 702.250854, height, -341.732147)
    142 guard:walkTo( 681.786011, height, -393.487030)
    143 guard:walkTo( 664.005981, height, -441.609131)
    144 guard:walkTo( 655.612671, height, -523.194153)
    145 guard:walkTo( 664.289978, height, -585.003540)
    146 guard:walkTo( 670.221069, height, -645.366333)
    147 guard:walkTo( 674.347290, height, -704.953674)
    148 guard:walkTo( 677.495605, height, -750.421082)
    149 guard:walkTo( 680.699280, height, -796.687073)
    150 guard:walkTo( 686.407043, height, -879.117859)
    151 guard:walkTo( 692.573364, height, -952.031555)
    152 guard:walkTo( 701.940552, height, -1025.037964)
    153 guard:walkTo( 710.218628, height, -1086.598389)
    154 guard:walkTo( 719.834900, height, -1142.248779)
    155 guard:walkTo( 731.087158, height, -1198.201538)
    156 guard:walkTo( 745.157715, height, -1258.461182)
    157 guard:walkTo( 753.189331, height, -1290.539551)
    158 guard:walkTo( 763.940369, height, -1347.249268)
    159 guard:walkTo( 768.509949, height, -1377.040039)
    160 guard:walkTo( 770.845215, height, -1408.751953)
    161 guard:walkTo( 770.785583, height, -1435.573608)
    162 guard:walkTo( 765.031799, height, -1462.657593)
    163 guard:walkTo( 753.982727, height, -1483.425415)
    164 guard:walkTo( 735.194580, height, -1500.978394)
    165 guard:walkTo( 707.312500, height, -1514.814575)
    166 guard:walkTo( 672.638550, height, -1522.803589)
    167 guard:walkTo( 560.158936, height, -1530.277344)
    168 guard:walkTo( 500.429626, height, -1532.241577)
    169 guard:walkTo( 371.231262, height, -1535.953613)
    170 guard:walkTo( 204.211609, height, -1539.026611)
    171 guard:walkTo( 104.032593, height, -1546.350220)
    172 guard:walkTo( 45.058315, height, -1550.720337)
    173 guard:walkTo( 1.504358, height, -1574.713745)
    174 guard:walkTo( -20.050890, height, -1627.849854)
    175 guard:walkTo( -28.036245, height, -1674.240479)
    176 guard:walkTo( -29.157598, height, -1702.924316)
    177 guard:walkTo( -29.760004, height, -1730.014526)
    178 guard:walkTo( -29.538343, height, -1759.887329)
    179 guard:walkTo( -21.584003, height, -1790.162842)
    180 guard:walkTo( -8.572795, height, -1823.067871)
    181 guard:walkTo( 13.254844, height, -1861.705688)
     148
     149guard:walkTo( 133.354797, height, 504.669128)
     150guard:walkTo( 147.490158, height, 507.034393)
     151guard:walkTo( 157.640610, height, 508.901001)
     152guard:walkTo( 168.830688, height, 510.958710)
     153guard:walkTo( 185.020630, height, 512.736206)
     154guard:walkTo( 201.232452, height, 513.413818)
     155guard:walkTo( 265.666138, height, 513.736023)
     156guard:walkTo( 362.377960, height, 515.575806)
     157guard:walkTo( 426.176392, height, 515.666748)
     158guard:walkTo( 500.031677, height, 515.197266)
     159guard:walkTo( 551.294250, height, 514.430237)
     160guard:walkTo( 604.974731, height, 515.106323)
     161guard:walkTo( 651.117920, height, 516.026550)
     162guard:walkTo( 664.581909, height, 516.295227)
     163guard:walkTo( 683.122803, height, 516.665100)
     164guard:walkTo( 694.547485, height, 516.892944)
     165guard:walkTo( 704.408569, height, 517.089539)
     166guard:walkTo( 714.413208, height, 517.289185)
     167guard:walkTo( 739.045288, height, 515.581970)
     168guard:walkTo( 763.904541, height, 497.281738)
     169guard:walkTo( 767.672791, height, 481.974457)
     170guard:walkTo( 769.436951, height, 468.704559)
     171guard:walkTo( 770.490967, height, 453.283386)
     172guard:walkTo( 771.185303, height, 435.960114)
     173guard:walkTo( 771.952820, height, 379.502045)
     174guard:walkTo( 771.938293, height, 310.049042)
     175guard:walkTo( 772.514526, height, 231.579498)
     176guard:walkTo( 773.601074, height, 135.177933)
     177guard:walkTo( 773.790771, height, 50.675163)
     178guard:walkTo( 773.316162, height, -36.961666)
     179guard:walkTo( 772.885986, height, -116.407944)
     180guard:walkTo( 772.841309, height, -124.651726)
     181guard:walkTo( 772.491333, height, -137.742279)
     182guard:walkTo( 770.644775, height, -153.245926)
     183guard:walkTo( 768.774414, height, -163.767120)
     184guard:walkTo( 766.336426, height, -174.224228)
     185guard:walkTo( 762.794128, height, -187.312271)
     186guard:walkTo( 733.548279, height, -274.004791)
     187guard:walkTo( 713.113647, height, -329.657959)
     188guard:walkTo( 694.801819, height, -379.530243)
     189guard:walkTo( 681.276062, height, -422.047028)
     190guard:walkTo( 672.579102, height, -458.540985)
     191guard:walkTo( 670.843384, height, -465.824615)
     192guard:walkTo( 669.948364, height, -480.910645)
     193guard:walkTo( 669.361511, height, -493.648529)
     194guard:walkTo( 669.686829, height, -501.598572)
     195guard:walkTo( 674.055664, height, -582.077637)
     196guard:walkTo( 676.046387, height, -630.403809)
     197guard:walkTo( 677.839050, height, -674.209534)
     198guard:walkTo( 680.754944, height, -765.965515)
     199guard:walkTo( 681.034180, height, -803.351135)
     200guard:walkTo( 680.088806, height, -844.069031)
     201guard:walkTo( 677.801514, height, -899.952148)
     202guard:walkTo( 675.205627, height, -950.496460)
     203guard:walkTo( 672.847778, height, -996.413574)
     204guard:walkTo( 676.204041, height, -1043.556274)
     205guard:walkTo( 691.304382, height, -1088.596558)
     206guard:walkTo( 705.101318, height, -1128.320312)
     207guard:walkTo( 720.476013, height, -1164.364380)
     208guard:walkTo( 729.216797, height, -1183.948364)
     209guard:walkTo( 740.145203, height, -1212.598267)
     210guard:walkTo( 746.547363, height, -1238.340576)
     211guard:walkTo( 756.866211, height, -1280.605347)
     212guard:walkTo( 763.380554, height, -1314.622314)
     213guard:walkTo( 768.731506, height, -1347.977539)
     214guard:walkTo( 772.446655, height, -1381.641479)
     215guard:walkTo( 772.721069, height, -1421.184937)
     216guard:walkTo( 772.414734, height, -1457.349121)
     217guard:walkTo( 772.803284, height, -1489.560913)
     218
    182219hangarRouteProgrammed  = true
    183220end
Note: See TracChangeset for help on using the changeset viewer.