Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10767 for code


Ignore:
Timestamp:
Nov 5, 2015, 9:48:41 PM (9 years ago)
Author:
paulsc
Message:

Changed coordinates to (y,z,x) and implemented FPSPlayer. Undocking seems ineffective though (Has it ever been implemented?). This may be resolved by an 'undock dock'.

File:
1 edited

Legend:

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

    r10766 r10767  
    4343        allies = 3
    4444
    45         --[[ Coordinates. NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
     45        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
    4646        cCenter = {0, 0, 0}
    47         cSpawn = {0, -50, 0}
    48         cUnit = {3000, -2000, 0}
    49         cA = {5000, -3000, 0}
    50         cB = {-5000, -3000, 0}
    51         cC = {0, -2300, 0}
    52         dStation = {0, 1, 0}
    53         cNewShip = {4100, -2100, 0}
    54         cFPSGround = {0, -2300, 1200}
    55         dFPSGround = {0, 0, -1}
    56         cFPS = {0, -2300, 1201}
    57         cField1 = {2500, 400, 0}
    58         cField2 = {-2500, 400, 0}
    59         cPlanet1 = {15000, 8000, -2000}
    60         cPlanet2 = {-1000, -20000, 4000}
    61         rAllies = {3000, -2000}         --[[ To be addressed directly, hence r ]]--
     47        cSpawn = {-50, 0, 0}
     48        cUnit = {-2000, 0, 3000}
     49        cA = {-3000, 0, 5000}
     50        cB = {-3000, 0, -5000}
     51        cC = {-2300, 0, 0}
     52        dStation = {1, 0, 0}
     53        cNewShip = {-2100, 0, 4100}
     54        cFPSGround = {-2300, 800, 0}
     55        cFPS = {-2300, 1000, 0}
     56        cField1 = {400, 0, 2500}
     57        cField2 = {400, 0, -2500}
     58        cPlanet1 = {8000, -2000, 15000}
     59        cPlanet2 = {-20000, 4000, -1000}
     60        rAllies = {3000, -2000}         --[[ To be addressed directly, hence r. Do not permute! ]]--
    6261
    6362        --[[ Function to print Coordinates. Quotes not included! ]]--
     
    586585                        <EventListener event="dockC" />
    587586                    </execute>
     587                    <undocking>
     588                        <EventListener event="undockC" />
     589                    </undocking>
    588590                </events>
    589591                <attached>
     
    618620    </SpaceShip>
    619621
    620     <!-- FPS Player as destination of dock C-->
    621     <FpsPlayer team=0 template = "fps" radarname = "First Person Player" position = "<?lua printC(cFPS) ?>">
     622    <!-- FPS Player as destination of dock C -->
     623    <FpsPlayer team=0 template = "fps" radarname = "Cannon Suit" position = "<?lua printC(cFPS) ?>" lookat="<?lua printC(cCenter) ?>">
    622624        <attached>
    623625            <DockingTarget name="fpsMode" />
    624626            <DistanceTriggerBeacon name="fpsPlayer" />
    625627        </attached>
     628        <collisionShapes>
     629            <BoxCollisionShape position="0,0,0" halfExtents="1,1,1"/>
     630        </collisionShapes>
    626631    </FpsPlayer>
    627632
    628     <StaticEntity position="<?lua printC(cFPSGround) ?>" direction="<?lua printC(dFPSGround) ?>" collisionType=static mass=100000 friction=0.01 >
     633    <!-- Floor for FPS Player -->
     634    <StaticEntity position="<?lua printC(cFPSGround) ?>" collisionType=static mass=100000 friction=0.01 >
    629635        <attached>
    630             <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
     636            <Model position="0,0,0" mesh="crate.mesh" scale3D="80,5,80" />
     637            <Billboard position="320,50,320" material="Flares/ringflare2" colour="0.2,0.4,0.8" />
     638            <DistanceTrigger position="320,50,320" distance="50" target="Pawn" beaconMode="identify" targetname="fpsPlayer" name="undockC"/>
     639            <ForceField active=false position="0,0,0" mode="homogen" diameter="600" forcedirection = "0,-500,0" />
     640            <!-- TODO: Invisible boundaries to prevent falling off platform -->
    631641        </attached>
    632642        <collisionShapes>
    633             <BoxCollisionShape position="0,0,0" halfExtents="80,80,5" />
     643            <BoxCollisionShape position="0,0,0" halfExtents="400,25,400" />
    634644        </collisionShapes>
    635645    </StaticEntity>
     
    714724    y = rAllies[2] + math.sin(2*math.pi/allies*(i+1))*100
    715725    ?>
    716     <SpaceShip visible=false active=false name="allies<?lua print(k)?>" radarname="Ally" position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*100) ?>" lookat="0,0,0" team=0>
     726    <SpaceShip visible=false active=false name="allies<?lua print(k)?>" radarname="Ally" position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*100) ?>,<?lua print(x)?>" lookat="0,0,0" team=0>
    717727        <templates>
    718728            <Template link="spaceshipassff" />
     
    747757    y = math.sin(math.pi/(enemies + 3)*(i+1))*1500
    748758    ?>
    749     <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>" lookat="0,0,0" team=1>
     759    <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>,<?lua print(x)?>" lookat="0,0,0" team=1>
    750760        <templates>
    751761            <Template link="spaceshippirate" />
     
    797807                    y = -math.sin(math.pi*(i+1)/8)*700-3000
    798808                    ?>
    799                     <Billboard position="<?lua print(x) ?>,<?lua print(y) ?>,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
     809                    <Billboard position="<?lua print(y) ?>,0,<?lua print(x) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
    800810                    <?lua end ?>
    801811
     
    811821                    y = -math.sin(math.pi*(max+2-i)/8)*700-3000
    812822                    ?>
    813                     <Billboard position="<?lua print(x) ?>,<?lua print(y) ?>,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
     823                    <Billboard position="<?lua print(y) ?>,0,<?lua print(x) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
    814824                    <?lua end ?>
    815825
Note: See TracChangeset for help on using the changeset viewer.