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