Re: Scripts help pls part 3 - SOLVED
Posted: Thu Jan 29, 2015 12:40 am
confirmed, wonderfull. thanksAdrTru wrote:I am sorry, my script for 1/ and 2/ had bug in items in containers.
script is fixed.
about 4/. I try to make new healing_crystal like this (I think that its working correctly):Code: Select all
defineObject{ name = "healing_crystal_2use", baseObject = "healing_crystal", components = { { class = "Counter", name = "counter", onActivate = function(self) self.go.clickable:disable() self.go.crystal:setCooldown(math.huge) end, onInit = function(self) self:setValue(2); end, }, { class = "Clickable", offset = vec(0, 1.5, 0), size = vec(1.6, 2, 1.6), maxDistance = 1, onClick = function(self) if self.go.crystal:isEnabled() then self.go.counter:decrement() end end, }, } }