Added and used a new trigger without recompiling, scripting really works. :)
This commit is contained in:
parent
72d1009007
commit
f4408b76e8
@ -26,16 +26,16 @@
|
|||||||
<toChangeObjNum>0</toChangeObjNum>
|
<toChangeObjNum>0</toChangeObjNum>
|
||||||
</trigger>
|
</trigger>
|
||||||
<trigger>
|
<trigger>
|
||||||
<name>deleteRandomObjectAtTorch</name>
|
<name>deleteMarbleAtTorch</name>
|
||||||
<xPosition>0.0</xPosition>
|
<xPosition>0.0</xPosition>
|
||||||
<yPosition>0.0</yPosition>
|
<yPosition>0.0</yPosition>
|
||||||
<zPosition>0.0</zPosition>
|
<zPosition>0.0</zPosition>
|
||||||
<targetIdGreen>1</targetIdGreen>
|
<targetIdGreen>1</targetIdGreen>
|
||||||
<targetIdBlue>3</targetIdBlue>
|
<targetIdBlue>3</targetIdBlue>
|
||||||
<distance>2.0</distance>
|
<distance>2.5</distance>
|
||||||
<isBiggerThan>false</isBiggerThan>
|
<isBiggerThan>false</isBiggerThan>
|
||||||
<objectNum>0</objectNum>
|
<objectNum>0</objectNum>
|
||||||
<luaScript>deleteRandomObject</luaScript>
|
<luaScript>deleteObject</luaScript>
|
||||||
<toChangeIdGreen>1</toChangeIdGreen>
|
<toChangeIdGreen>1</toChangeIdGreen>
|
||||||
<toChangeIdBlue>5</toChangeIdBlue>
|
<toChangeIdBlue>5</toChangeIdBlue>
|
||||||
<toChangeObjNum>0</toChangeObjNum>
|
<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