Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2018, 3:16:09 PM (7 years ago)
Author:
adamc
Message:

Fixed killing and moving of entities & commit issue

Location:
code/branches/ScriptableController_FS18/data/levels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController_FS18/data/levels/BBBScriptableControllerTest.oxw

    r11928 r11932  
    3333
    3434
    35   <AAAAutonomousDrone id="Dummy" position="0,0,0" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
     35  <AAAAutonomousDrone id="dummy" position="0,0,0">
    3636    <attached>
    3737      <Model scale="10" mesh="drone.mesh"/>
    3838    </attached>
     39    <collisionShapes>
     40      <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
     41    </collisionShapes>
    3942  </AAAAutonomousDrone>
    4043   
  • code/branches/ScriptableController_FS18/data/levels/scripts/BBBScriptableControllerTest.lua

    r11928 r11932  
    11
    2 rotate_factor = 0
    3 station_loc = 200
    4 station_speed = 0
     2id = "dummy"
    53
    6 id = "Dummy"
    7 
    8 function spawn_station(obj)
    9         orxPrint("Spawning station")
    10         setPosition("Station", 500, 0, 0)
    11         setOrientation("Station", 0, -1, 0, 0)
    12 end
    13 
    14 function rotate_faster(obj1, obj2, health, shield)
    15         orxPrint("Rotating station faster")
    16 
    17         rotate_factor = rotate_factor + 0.02
    18         setAngularVelocity("Station", rotate_factor, 0, 0)
    19 end
    204
    215
     
    4630function move_dummy()
    4731        orxPrint("Moving dummy!")
    48         moveControllableEntity(id, 100.0, 0.0, 0.0)
     32        moveControllableEntity(id, 1.0, 0.0, 0.0)
    4933end
    5034
     
    5640
    5741
    58 function next_station_loc(obj1, obj2)
    59         orxPrint("Moving station")
    60 
    61         station_loc = station_loc + 500
    62         setPosition("Station", station_loc, 0, 0)
    63 
    64         station_speed = station_speed + 5
    65         setVelocity("Station", -station_speed, 0, 0)
    66 
    67         registerAtNearObject(next_station_loc, "Player", "Station", 200)
    68 end
    6942
    7043
     44move_dummy_after_timeout(5)
     45kill_dummy_after_timeout(10)
    7146
    72 
    73 
    74 move_dummy_after_timeout(3)
    75 kill_dummy_after_timeout(6)
    7647
    7748orxPrint("Script started! OMG ROFL LOL WTF")
Note: See TracChangeset for help on using the changeset viewer.