Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 12184 was 12006, checked in by adamc, 6 years ago

first final draft

File size: 810 bytes
RevLine 
[11928]1
[11932]2id = "dummy"
[11928]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
[11936]23
[11928]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!")
[11932]32        moveControllableEntity(id, 1.0, 0.0, 0.0)
[11928]33end
34
[11936]35
[11928]36function move_dummy_after_timeout(seconds)
37        orxPrint("Moving dummy after " .. tostring(seconds))
38        registerAfterTimeout(move_dummy, seconds)
39end
40
41
42
43
[11932]44move_dummy_after_timeout(5)
45kill_dummy_after_timeout(10)
[11928]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.