Page 2 of 2

Re: Scripts help pls part 3 - SOLVED

Posted: Thu Jan 29, 2015 12:40 am
by Drakkan
AdrTru 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,
		},
	}
}
confirmed, wonderfull. thanks

Re: Scripts help pls part 3 - SOLVED

Posted: Fri Jan 30, 2015 6:15 am
by Frenchie
Hi. With the (st) do I type in a number for the party to move forward eg: 1 or 2 or 3 etc...? Thxs
Yes, you use Move(1) and Move(2), etc. to go forward. It's a straight forward teleporter. You can still turn when stuck and use it again to get free. I might modify it to use it vertical as well.

I started a new topic to see if a 3-dimensional teleporter is possible here.