Added and used a new trigger without recompiling, scripting really works. :)
This commit is contained in:
parent
b483cb2eb9
commit
c6d4e1d916
@ -26,16 +26,16 @@
|
||||
<toChangeObjNum>0</toChangeObjNum>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<name>deleteRandomObjectAtTorch</name>
|
||||
<name>deleteMarbleAtTorch</name>
|
||||
<xPosition>0.0</xPosition>
|
||||
<yPosition>0.0</yPosition>
|
||||
<zPosition>0.0</zPosition>
|
||||
<targetIdGreen>1</targetIdGreen>
|
||||
<targetIdBlue>3</targetIdBlue>
|
||||
<distance>2.0</distance>
|
||||
<distance>2.5</distance>
|
||||
<isBiggerThan>false</isBiggerThan>
|
||||
<objectNum>0</objectNum>
|
||||
<luaScript>deleteRandomObject</luaScript>
|
||||
<luaScript>deleteObject</luaScript>
|
||||
<toChangeIdGreen>1</toChangeIdGreen>
|
||||
<toChangeIdBlue>5</toChangeIdBlue>
|
||||
<toChangeObjNum>0</toChangeObjNum>
|
||||
|
11
Levels/scripts/deleteObject.lua
Normal file
11
Levels/scripts/deleteObject.lua
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user