From 78aef93eef587990170161eecb2a4d3c7909a6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=BCndgens?= Date: Tue, 13 Jan 2015 17:52:31 +0100 Subject: [PATCH] Added and used a new trigger without recompiling, scripting really works. :) --- Levels/ObjectSetups/Level1.xml | 6 +++--- Levels/scripts/deleteObject.lua | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 Levels/scripts/deleteObject.lua diff --git a/Levels/ObjectSetups/Level1.xml b/Levels/ObjectSetups/Level1.xml index 5626fcc..2d5fa20 100644 --- a/Levels/ObjectSetups/Level1.xml +++ b/Levels/ObjectSetups/Level1.xml @@ -26,16 +26,16 @@ 0 - deleteRandomObjectAtTorch + deleteMarbleAtTorch 0.0 0.0 0.0 1 3 - 2.0 + 2.5 false 0 - deleteRandomObject + deleteObject 1 5 0 diff --git a/Levels/scripts/deleteObject.lua b/Levels/scripts/deleteObject.lua new file mode 100644 index 0000000..a49b066 --- /dev/null +++ b/Levels/scripts/deleteObject.lua @@ -0,0 +1,11 @@ +function trigger(objectToChange) + if(not level) then + print("No level found in Lua!") + return + end + if(not physics) then + print("No physics found in Lua!") + return + end + level:deleteObject(objectToChange) +end