Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ScriptableController_FS18/data/levels/scripts/AAAScriptableControllerTest.lua @ 11932

Last change on this file since 11932 was 11928, checked in by adamc, 6 years ago

Level & Script backup

File size: 986 bytes
Line 
1
2rotate_factor = 0
3station_loc = 200
4station_speed = 0
5
6function spawn_station(obj)
7        orxPrint("Spawning station")
8        setPosition("Station", 500, 0, 0)
9        setOrientation("Station", 0, -1, 0, 0)
10end
11
12function rotate_faster(obj1, obj2, health, shield)
13        orxPrint("Rotating station faster")
14
15        rotate_factor = rotate_factor + 0.02
16        setAngularVelocity("Station", rotate_factor, 0, 0)
17end
18
19
20function kill_player()
21        orxPrint("Killing player")
22        killPawn("Player")
23end
24
25function kill_player_after_timeout(pawn)
26        orxPrint("Killing player after 5s")
27
28        registerAfterTimeout(kill_player, 5)
29end
30
31function next_station_loc(obj1, obj2)
32        orxPrint("Moving station")
33
34        station_loc = station_loc + 500
35        setPosition("Station", station_loc, 0, 0)
36
37        station_speed = station_speed + 5
38        setVelocity("Station", -station_speed, 0, 0)
39
40        registerAtNearObject(next_station_loc, "Player", "Station", 200)
41end
42
43
44
45
46
47orxPrint("Script started! OMG ROFL LOL WTF")
48mytestfunction(3.0, 4.0)
49spawn("ModularSpaceShip","Station2")
50
Note: See TracBrowser for help on using the repository browser.