Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8869


Ignore:
Timestamp:
Aug 25, 2011, 5:13:18 PM (13 years ago)
Author:
jo
Message:

Further work on tutorial. More about it in the forums.

Location:
code/branches/ai2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/data/levels/includes/weaponSettingsTransporter.oxi

    r7679 r8869  
    1414        </links>
    1515        <Weapon>
    16           <HsW01 mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" />
    17           <HsW01 mode=0 munitionpershot=0 delay=0.1 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
    18           <LightningGun mode=1 muzzleoffset="0,0,0" />
     16          <HsW01 mode=0 munitionpershot=0 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
     17          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
     18          <LightningGun mode=1 muzzleoffset="0,0,0"   damage=3.14159 shielddamage=20 />
    1919        </Weapon>
    2020        <Weapon>
    21           <HsW01 mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" />
    22           <HsW01 mode=0 munitionpershot=0 delay=0.1 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
    23           <LightningGun mode=1 muzzleoffset="0,0,0" />
     21          <HsW01 mode=0 munitionpershot=0 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
     22          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
     23          <LightningGun mode=1 muzzleoffset="0,0,0"   damage=3.14159 shielddamage=20 />
    2424        </Weapon>
    2525      </WeaponPack>
  • code/branches/ai2/data/levels/missionOne.oxw

    r8851 r8869  
    1212  include("templates/spaceshipPirate.oxt")
    1313  include("templates/spaceshipSpacecruiser.oxt")
     14  include("templates/spaceshipTransporter.oxt")
    1415?>
    1516
     
    1920
    2021<Level
    21  name         = "Tutorial"
     22 name         = "Mission One"
    2223 description  = "How to steer a spaceship."
    2324>
     
    5455    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    5556    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
    56     <!-- Script code="artificialcontroller setbotlevel 0.1" /--> <!-- Does not influence waypointPatrolController-->
     57    <!-- Script code="artificialcontroller setbotlevel 0.1" /-->
    5758
    5859<!-- END OF INCLUDES & NECESSARITIES -->
     
    278279    </SimpleNotification>
    279280
    280 
    281 
    282 <!-- PORTALS -->
    283     <Template name=PortalDefault>
    284         <PortalEndPoint>
    285             <attached>
    286                 <Billboard material="Portals/Default" />
    287             </attached>
    288         </PortalEndPoint>
    289     </Template>
    290 
    291     <PortalEndPoint position="-1400,-500,800" id="1" distance="40" target="MobileEntity" design="PortalDefault">
    292         <!--events>
    293             <visibility>
    294                 <EventListener event=portal />
    295             </visibility>
    296         </events-->
    297     </PortalEndPoint>
    298 
    299     <PortalEndPoint position="-47000,-1000,0" id="2" distance="40" target="MobileEntity" design="PortalDefault" />
    300     <PortalLink fromID="1" toID="2" />
    301     <PortalLink fromID="2" toID="1" />
    302 <!-- PORTALS END-->
    303 
    304 
    305 
    306281<StaticEntity position="-1000,-300,700" collisionType=static>
    307282      <attached>
    308         <Model scale=11 mesh="DuBall1.mesh" position = "-100,0,0"/>
    309         <Model scale=11 mesh="DuBall2.mesh" position = "100,0,0"/>
     283        <Model scale=13 mesh="DuBall1.mesh" position = "-100,0,0"/>
     284        <Model scale=13 mesh="DuBall2.mesh" position = "100,0,0"/>
    310285        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "-100,0,0"/>
    311286        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>       
     
    318293</StaticEntity>
    319294
    320     <DistanceTrigger name="duball3" position="-1000,-300,700" target="Pawn" distance=700 stayActive="true" delay=6 />
    321     <!-- SpaceShip position="-1000,900,700" lookat="0,0,0">
    322       <templates>
    323         <Template link=spaceshipTransporter />
    324       </templates>
    325       <controller>
    326         <WaypointPatrolController>
    327           <waypoints>
    328             <Model mesh="cube.mesh" scale=8 position="-1000,500,700" />
    329           </waypoints>
    330         </WaypointPatrolController>
    331       </controller>
    332         <events>
    333             <trigger>
    334                 <EventListener event=duball3 />
    335             </trigger>
    336         </events>
    337     </SpaceShip -->
    338 
     295
     296
     297<!-- PORTALS -->
     298    <Template name=PortalDefault>
     299        <PortalEndPoint>
     300            <attached>
     301                <Billboard material="Portals/Default" />
     302            </attached>
     303        </PortalEndPoint>
     304    </Template>
     305
     306    <PortalEndPoint position="-1400,-500,800" id="1" distance="50" target="MobileEntity" design="PortalDefault">
     307        <!--events>
     308            <visibility>
     309                <EventListener event=portal />
     310            </visibility>
     311        </events-->
     312    </PortalEndPoint>
     313
     314    <PortalEndPoint position="-47000,-1000,1300" id="2" distance="70" target="MobileEntity" design="PortalDefault" />
     315    <PortalLink fromID="1" toID="2" />
     316    <PortalLink fromID="2" toID="1" />
     317<!-- PORTALS END-->
     318
     319    <DistanceTrigger name="toHydroFarmer" position="-47000,-1000,1300" target="Pawn" distance=700 stayActive="true" delay=0 />
     320    <SimpleNotification message="Find the Hydrogen Farmer.">
     321        <events>
     322            <trigger>
     323                <EventListener event=toHydroFarmer />
     324            </trigger>
     325        </events>
     326    </SimpleNotification>
    339327<!-------------------------------------- PART FOUR : Get Help --------------------------------------->   
    340     <DistanceTrigger name="famer1" position="-48200,100,0" target="Pawn" distance=300 stayActive="true" delay=0 />
     328    <DistanceTrigger name="famer1" position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=0 />
    341329    <SimpleNotification message="We just received a message from DuBall.">
    342330        <events>
     
    347335    </SimpleNotification>
    348336
    349     <DistanceTrigger name="famer2" position="-48200,100,0" target="Pawn" distance=300 stayActive="true" delay=4 />
     337    <DistanceTrigger name="famer2" position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=4 />
    350338    <SimpleNotification message="We will lend you our strongest ship.">
    351339        <events>
     
    355343        </events>
    356344    </SimpleNotification>
    357 <!-- TODO: a) docking, b) spacecruiser, c) enemy -->
     345
     346<!-- TODO: c) enemy -->
    358347
    359348    <!-- HYDROGEN FARMER & DOCKING?? -->
    360     <SpaceShip position="-48600,100,0" roll=90 yaw=0 pitch=20 mass=10000 health=100000 >
     349    <SpaceShip position="-48900,100,0" roll=90 yaw=0 pitch=20 mass=10000 health=100000 >
    361350      <attached>
    362351        <!-- Docking -->
     
    402391    </SpaceShip>
    403392
    404     <Billboard position="-48600,0,0" material="Examples/Flare" colour="0.6,0,0" scale=3/>
    405     <Dock position="-48600,0,0" roll=90 yaw=180 >
     393    <Billboard position="-48900,0,0" material="Examples/Flare" colour="0.6,0,0" scale=3/>
     394    <Dock position="-48900,0,0" roll=90 yaw=180 >
    406395        <animations>
    407396            <MoveToDockingTarget target="destroyer" />
     
    422411    </Dock>
    423412
    424     <SpaceShip template="spaceshipspacecruiser" position="-48600,800,0" orientation="-0.14, 0.68, 0.68, 0.223" health="300" maxhealth="400" initialhealth="300">
     413    <SpaceShip template="spaceshipspacecruiser" position="-48900,800,0" orientation="-0.14, 0.68, 0.68, 0.223" health="300" maxhealth="400" initialhealth="300">
    425414      <attached>
    426415        <DockingTarget name="spaceShip" />
     
    429418
    430419
    431 
    432 
    433 
    434 
    435420<!-- Pickup - find better place !! -->
    436     <DistanceTrigger name="pickup" position="-49300,-100,-50" target="Pawn" distance=20 stayActive="true" delay=0 />
    437     <SimpleNotification message="This pickup makes you temporarly small.">
     421    <DistanceTrigger name="pickup" position="-48650,700,100" target="Pawn" distance=60 stayActive="true" delay=0 />
     422    <SimpleNotification message="This pickup protects your spaceship.">
    438423        <events>
    439424            <trigger>
     
    443428    </SimpleNotification>
    444429
    445     <PickupSpawner position="-49300,-100,-50" triggerDistance="20" respawnTime="30" maxSpawnedItems="1">
     430    <PickupSpawner position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1">
    446431      <pickup>
    447         <ShieldPickup template=hugeshrinkpickup />
     432        <ShieldPickup template=hugeshieldpickup />
    448433      </pickup>
    449434    </PickupSpawner>
    450435<!-- Pickup-->
     436
     437    <DistanceTrigger name="attack" position="-48650,700,100" target="Pawn" distance=100 stayActive="true" delay=4 />
     438    <SimpleNotification message="Return before it is too late. Boost with 'Space'.">
     439        <events>
     440            <trigger>
     441                <EventListener event=attack />
     442            </trigger>
     443        </events>
     444    </SimpleNotification>
    451445
    452446
     
    477471
    478472
     473
     474<!-------------------------------------- The attack --------------------------------------->
     475
     476<!-- TODO:
     477     - better performance: 4-8 Transporters from different directions heading towards duball's station
     478     - attached with triggers: - if all bots died, then display end message
     479                               - do a count down: 'x enemies left'
     480     - update spaceshipTransporter
     481     - bots do friendly fire (is drone function reusable?)
     482-->
     483<!-- 1 -->
     484    <SpaceShip position="3000,-4000,4000" lookat="-1300,-600,900">
     485        <templates>
     486            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     487        </templates>
     488        <controller>
     489            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     490                <waypoints>
     491                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     492                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     493                </waypoints>
     494                <events>
     495                    <activity>
     496                        <EventListener event="attack" /> <!-- activates enemies-->
     497                     </activity>
     498                </events>
     499            </WaypointPatrolController>
     500        </controller>
     501    </SpaceShip>
     502<!-- 2 -->
     503    <SpaceShip position="3000,-4000,-4000" lookat="-1300,-600,900">
     504        <templates>
     505            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     506        </templates>
     507        <controller>
     508            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     509                <waypoints>
     510                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     511                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     512                </waypoints>
     513                <events>
     514                    <activity>
     515                        <EventListener event="attack" /> <!-- activates enemies-->
     516                     </activity>
     517                </events>
     518            </WaypointPatrolController>
     519        </controller>
     520    </SpaceShip>
     521<!-- 3 -->
     522    <SpaceShip position="-4000,-3000,4000" lookat="-1300,-600,900">
     523        <templates>
     524            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     525        </templates>
     526        <controller>
     527            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     528                <waypoints>
     529                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     530                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     531                </waypoints>
     532                <events>
     533                    <activity>
     534                        <EventListener event="attack" /> <!-- activates enemies-->
     535                     </activity>
     536                </events>
     537            </WaypointPatrolController>
     538        </controller>
     539    </SpaceShip>
     540<!-- 4 -->
     541    <SpaceShip position="-3000,-3000,-5000" lookat="-1300,-600,900">
     542        <templates>
     543            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     544        </templates>
     545        <controller>
     546            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     547                <waypoints>
     548                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     549                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     550                </waypoints>
     551                <events>
     552                    <activity>
     553                        <EventListener event="attack" /> <!-- activates enemies-->
     554                     </activity>
     555                </events>
     556            </WaypointPatrolController>
     557        </controller>
     558    </SpaceShip>
     559<!-- 5 -->
     560    <SpaceShip position="4000,4000,3000" lookat="-1300,-600,900">
     561        <templates>
     562            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     563        </templates>
     564        <controller>
     565            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     566                <waypoints>
     567                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     568                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     569                </waypoints>
     570                <events>
     571                    <activity>
     572                        <EventListener event="attack" /> <!-- activates enemies-->
     573                     </activity>
     574                </events>
     575            </WaypointPatrolController>
     576        </controller>
     577    </SpaceShip>
     578<!-- 6 -->
     579    <SpaceShip position="2000,-4000,5000" lookat="-1300,-600,900">
     580        <templates>
     581            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     582        </templates>
     583        <controller>
     584            <WaypointPatrolController alertnessradius=3129 team=0 active=false>
     585                <waypoints>
     586                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     587                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     588                </waypoints>
     589                <events>
     590                    <activity>
     591                        <EventListener event="attack" /> <!-- activates enemies-->
     592                     </activity>
     593                </events>
     594            </WaypointPatrolController>
     595        </controller>
     596    </SpaceShip>
     597
     598
     599<!--- TODO: Catch event when all enemies are dead; display an end message --->
     600<!--- Message: Mission accomplished. Well done. Either you return to the main menu by pressing 'Esc' & then the button 'return to main menu'
     601      or you might want to discover some further tricks. Then use the new portal. --->
     602
     603<!-------------------------------------- |Bonus Part| --------------------------------------->
     604<!-- PortalEndPoint is not invisible (and triggered yet); billboard has to be removed later.
     605    <Billboard position="-48900,0,0" material="Examples/Flare" colour="7010,10010,-5010" scale=5/>
     606    <Template name=PortalDefault>
     607        <PortalEndPoint>
     608            <attached>
     609                <Billboard material="Portals/Default" />
     610            </attached>
     611        </PortalEndPoint>
     612    </Template>
     613
     614    <PortalEndPoint position="800,-700,500" id="3" distance="50" target="MobileEntity" design="PortalDefault">
     615        <events>
     616            <visibility>
     617                <EventListener event=bonus />
     618            </visibility>
     619        </events>
     620    </PortalEndPoint>
     621
     622    <PortalEndPoint position="7000,10000,-5000" id="4" distance="70" target="MobileEntity" design="PortalDefault">
     623        <events>
     624            <visibility>
     625                <EventListener event=bonus />
     626            </visibility>
     627        </events>
     628    </PortalEndPoint>
     629
     630    <PortalLink fromID="3" toID="4" />
     631    <PortalLink fromID="4" toID="3" />
     632
     633    <DistanceTrigger name="bonus1" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=4 />
     634    <SimpleNotification message="Rotate your ship. Press 'Q' or 'E'. ">
     635        <events>
     636            <trigger>
     637                <EventListener event=bonus1 />
     638            </trigger>
     639        </events>
     640    </SimpleNotification>
     641
     642    <DistanceTrigger name="bonus2" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=8 />
     643    <SimpleNotification message="Switch the camera's position. Press 'C'. ">
     644        <events>
     645            <trigger>
     646                <EventListener event=bonus2 />
     647            </trigger>
     648        </events>
     649    </SimpleNotification>
     650
     651    <DistanceTrigger name="bonus3" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=12 />
     652    <SimpleNotification message="360° view: press 'Ctrl' + use the mouse ">
     653        <events>
     654            <trigger>
     655                <EventListener event=bonus3 />
     656            </trigger>
     657        </events>
     658    </SimpleNotification>
     659
     660    <DistanceTrigger name="bonus4" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=16 />
     661    <SimpleNotification message="Have a look at the main menu's settings.">
     662        <events>
     663            <trigger>
     664                <EventListener event=bonus4 />
     665            </trigger>
     666        </events>
     667    </SimpleNotification>
     668
     669    <DistanceTrigger name="bonus5" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=20 />
     670    <SimpleNotification message="E.g: Settings->Miscellaneous->Nr. of bots">
     671        <events>
     672            <trigger>
     673                <EventListener event=bonus5 />
     674            </trigger>
     675        </events>
     676    </SimpleNotification>
     677
     678    <DistanceTrigger name="bonus6" position="7000,10000,-5000" target="Pawn" distance=100 stayActive="true" delay=24 />
     679    <SimpleNotification message="That's it.">
     680        <events>
     681            <trigger>
     682                <EventListener event=bonus6 />
     683            </trigger>
     684        </events>
     685    </SimpleNotification>
     686-->
     687<!-- ATTENTION: DOESN'T WORK YET
     688    < Script code="artificialcontroller setbotlevel 0.1">
     689        <events>
     690            <trigger>
     691                <EventListener event=bonus6 />
     692            </trigger>
     693        </events>
     694    </Script>
     695
     696    < Script code="addbots 3">
     697        <events>
     698            <trigger>
     699                <EventListener event=bonus6 />
     700            </trigger>
     701        </events>
     702    </Script>
     703-->
     704
    479705<!--------------------------------------DUMP YARD --------------------------------------->
    480 
    481 
    482 
    483 <!-- TODO: a) bots trigger themselves b) bots are not in player's team c) bots do friendly fire -->
    484 
    485 <!--Trigger to activate this Team (TEAM NO 1)-->
    486     <!--DistanceTrigger name="activateTeam0No1" position="-40400,100,0" distance="300" target="Pawn" activations="1" stayactive="true" /-->
    487 <!--TEAM NO 1 (activationType : distance || killing a spaceship what belongs to TEAM 0 NO 0)-->
    488 <?lua for i=0,10,1 do
    489 x=math.random(-300,300)
    490 y=math.random(-200,200)
    491 z=math.random(-200,200)
    492 ?>
    493     <EventTrigger name="activateTeam0No1" activations=1 stayactive="true">
    494         <events>
    495             <trigger>
    496                 <SpaceShip position="<?lua print(x-39200) ?>,<?lua print(y-2000) ?>,<?lua print(z+4000) ?>" lookat="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>">
    497                     <templates>
    498                         <Template link=spaceshipassff />
    499                     </templates>
    500                     <controller>
    501                         <WaypointPatrolController alertnessradius=3129 team=0 active=false>
    502                             <waypoints>
    503                                 <Model mesh="cube.mesh" scale=0 position="-40000,0,0" />
    504                                 <Model mesh="cube.mesh" scale=0 position="-40100,250,-500" />
    505                                 <Model mesh="cube.mesh" scale=0 position="0,0,0" />
    506                             </waypoints>
    507                             <events>
    508                                 <activity>
    509                                     <EventListener event="activateTeam0No1" />
    510                                 </activity>
    511                             </events>
    512                         </WaypointPatrolController>
    513                     </controller>
    514                 </SpaceShip>
    515             </trigger>
    516         </events>
    517     </EventTrigger>
    518 
    519 <?lua end ?>
    520 <!--Creating spaceships (player's team) END -->
    521 
    522 
    523706
    524707
  • code/branches/ai2/src/orxonox/worldentities/ControllableEntity.h

    r8852 r8869  
    240240            CameraPosition* reverseCamera_;
    241241            WeakPtr<WorldEntity> target_;
    242             WeakPtr<Controller> test_;
    243242    };
    244243}
Note: See TracChangeset for help on using the changeset viewer.