this makes another going into the unknow depth of the blackhole Script!
The platform (on the post above) has to be part of some scale with another platform which measure the weight, a bit higher, where the player has to put items to reach a certain weight:
The problem is: how to store the list of all items placed on the altar, destroy all of them when the correct weight is obtained, and respawn all items on a new altar according to the list?
this is the script of the weight test:
SpoilerShow
Code: Select all
isFinished = false
function weightcheck()
if isFinished == true then
return
end
if getWeight(platform_up_22_1) == 93.9 then
mine_door_heavy_6.door:open()
playSound("secret")
timer_158.timer:start()
isFinished = true
else
mine_door_heavy_6.door:close()
end
end
function getWeight(alcove)
local a
local b = 0
for _, a in alcove.surface:contents() do
b = b + (a:getWeight() * a:getStackSize())
end
return b
end
Finally, all items that were on the both platforms are respawned.