rotate_factor = 0.0 station_loc = 200.0 station_speed = 0.0 id = "dummy" function spawn_station(obj) orxPrint("Spawning station") setPosition("Station", 500, 0, 0) setOrientation("Station", 0, -1, 0, 0) end function rotate_faster(obj1, obj2, health, shield) orxPrint("Rotating station faster") rotate_factor = rotate_factor + 0.02 setAngularVelocity("Station", rotate_factor, 0, 0) end function kill_player() orxPrint("Killing player") killPawn("Player") end function kill_player_after_timeout(pawn) orxPrint("Killing player after 5s") registerAfterTimeout(kill_player, 5) end function next_station_loc(obj1, obj2) orxPrint("Moving station") station_loc = station_loc + 500 setPosition("Station", station_loc, 0, 0) station_speed = station_speed + 5 setVelocity("Station", -station_speed, 0, 0) registerAtNearObject(next_station_loc, "Player", "Station", 200) end function kill_player() orxPrint("Killing player") killPawn("Player") end function kill_dummy() orxPrint("Killing dummy!") killPawn(id) end function spawn_dummy() orxPrint("Spawning dummy!") spawnTest("dummy") move_dummy() end function kill_player_after_timeout(pawn) orxPrint("Killing player after 5s") registerAfterTimeout(kill_player, 5) end function kill_dummy_after_timeout(seconds) orxPrint("Killing dummy after " .. tostring(seconds)) registerAfterTimeout(kill_dummy, seconds) end function move_dummy() orxPrint("Moving dummy!") moveControllableEntity(id, 1.0, 0.0, 0.0) end function move_dummy_after_timeout(seconds) orxPrint("Moving dummy after " .. tostring(seconds)) registerAfterTimeout(move_dummy, seconds) end function spawn_dummy_after_timeout(seconds) orxPrint("Spawning dummy after " .. tostring(seconds)) registerAfterTimeout(spawn_dummy, seconds) end orxPrint("Script started! OMG ROFL LOL WTF") mytestfunction(3.0, 4.0) spawn_dummy_after_timeout(10)