Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ScriptableController_FS18/data/levels/scripts/ScriptableControllerMoveKill.lua @ 12202

Last change on this file since 12202 was 12006, checked in by adamc, 7 years ago

first final draft

File size: 810 bytes
Line 
1
2id = "dummy"
3
4
5function kill_player()
6        orxPrint("Killing player")
7        killPawn("Player")
8end
9
10
11function kill_dummy()
12        orxPrint("Killing dummy!")
13        killPawn(id)
14end
15
16
17function kill_player_after_timeout(pawn)
18        orxPrint("Killing player after 5s")
19
20        registerAfterTimeout(kill_player, 5)
21end
22
23
24function kill_dummy_after_timeout(seconds)
25        orxPrint("Killing dummy after " .. tostring(seconds))
26        registerAfterTimeout(kill_dummy, seconds)
27end
28
29
30function move_dummy()
31        orxPrint("Moving dummy!")
32        moveControllableEntity(id, 1.0, 0.0, 0.0)
33end
34
35
36function move_dummy_after_timeout(seconds)
37        orxPrint("Moving dummy after " .. tostring(seconds))
38        registerAfterTimeout(move_dummy, seconds)
39end
40
41
42
43
44move_dummy_after_timeout(5)
45kill_dummy_after_timeout(10)
46
47
48orxPrint("Script started! OMG ROFL LOL WTF")
49mytestfunction(3.0, 4.0)
50
51
Note: See TracBrowser for help on using the repository browser.