2015-01-13 12:52:22 +00:00
|
|
|
function trigger(objectToChange)
|
2015-01-13 16:21:15 +00:00
|
|
|
if(not this_level) then
|
2015-01-13 12:52:22 +00:00
|
|
|
print("No level found!")
|
|
|
|
return
|
2015-01-13 16:21:15 +00:00
|
|
|
end
|
2015-01-13 12:52:22 +00:00
|
|
|
a = this_level:getObjectCount()
|
|
|
|
rand = math.random(0, a - 1)
|
|
|
|
this_level:deleteObject(rand)
|
|
|
|
print("Triggered from Lua!")
|
|
|
|
end
|