Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10680


Ignore:
Timestamp:
Oct 21, 2015, 4:48:52 PM (9 years ago)
Author:
bhatiab
Message:

Fixed Coordinates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/data/levels/Campaign1.oxw

    r10676 r10680  
    121121        <events>
    122122            <trigger>
    123                 <SpawnPoint team=1 position="-50,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
     123                <SpawnPoint team=1 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
    124124            </trigger>
    125125        </events>
     
    152152    <!--STRUCTURE -->
    153153
    154     <StaticEntity position="-2500,0,1800" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
     154    <!-- A, Coordinates are approx. (cos(29pi/16), sin(29pi/16), 0)*3000 -->
     155    <StaticEntity position="2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
    155156        <attached>
    156             <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
     157            <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" />
    157158        </attached>
    158159        <collisionShapes>
     
    161162    </StaticEntity>
    162163
    163     <StaticEntity position="-2500,0,-1800" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
     164    <!-- B, Coordinates are approx. (-cos(29pi/16), sin(29pi/16), 0)*3000 -->
     165    <StaticEntity position="-2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
    164166        <attached>
    165             <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
     167            <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" />
    166168        </attached>
    167169        <collisionShapes>
     
    172174    <!--ELEMENTS -->
    173175
     176    <!-- Enemies -->
    174177    <?lua
    175178    max = 5
     
    179182    y = math.sin(math.pi/8*(i+1))*1500
    180183    ?>
    181     <SpaceShip position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>,<?lua print(x)?>" lookat="0,0,0" team=2>
     184    <SpaceShip position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>" lookat="0,0,0" team=2>
    182185        <templates>
    183186            <Template link="spaceshippirate" />
    184187        </templates>
    185188        <controller>
    186             <WaypointPatrolController alertnessradius=600 team=1>
     189            <WaypointPatrolController alertnessradius=50 team=1>
    187190                <waypoints>
    188191                    <Attacher target="transporter" deletewithparent=false />
     
    193196    <?lua end ?>
    194197
    195     <SpaceShip position="-2500,0,1700" lookat="-2500,0,-1800" team=1 name="transporter">
     198    <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 -->
     199    <SpaceShip position="2450, -1667, 0" lookat="-2494, -1667, 0" team=1 name="transporter">
    196200        <templates>
    197201            <Template link="spaceshipTransporter" />
     
    200204            <WaypointController accuracy=10>
    201205                <waypoints>
    202                     <Model mesh="sphere.mesh" scale=100 position="-2500,0,1650" />
     206                    <!-- A to B -->
    203207                    <?lua
    204208                    max = 5
    205209                    for i = 1, max, 1
    206210                    do
    207                     x = math.cos(math.pi/8*(i+1))*3490
    208                     y = -math.sin(math.pi/8*(i+1))*3490
     211                    x = math.cos(math.pi*(i+1)/8)*2613
     212                    y = -math.sin(math.pi*(i+1)/8)*2613-887
    209213                    ?>
    210                     <Model mesh="sphere.mesh" scale=100 position="<?lua print(y) ?>+490,0,<?lua print(x) ?>" />
     214                    <Model mesh="sphere.mesh" scale=100 position="<?lua print(x) ?>,<?lua print(y) ?>,0" />
    211215                    <?lua end ?>
    212                     <Model mesh="sphere.mesh" scale=100 position="-2500,0,-1650" />
     216
     217                    <!-- Return Point -->
     218                    <Model mesh="sphere.mesh" scale=100 position="-2450, -1667, 0" />
     219
     220                    <!-- B to A -->
     221                    <?lua
     222                    max = 5
     223                    for i = 1, max, 1
     224                    do
     225                    x = math.cos(math.pi*(max+2-i)/8)*2613
     226                    y = -math.sin(math.pi*(max+2-i)/8)*2613-887
     227                    ?>
     228                    <Model mesh="sphere.mesh" scale=100 position="<?lua print(x) ?>,<?lua print(y) ?>,0" />
     229                    <?lua end ?>
     230
     231                    <!-- Start Point -->
     232                    <Model mesh="sphere.mesh" scale=100 position="2450,-1667,0" />
    213233                </waypoints>
    214234            </WaypointController>
Note: See TracChangeset for help on using the changeset viewer.