Page 1 of 1
[SOLVED] Fall into teleporter => floor_trigger not activated
Posted: Tue May 26, 2015 6:17 pm
by Zo Kath Ra
Let there be a test dungeon with a floor_trigger at:
elevation = 1
Let there also be a teleporter at:
elevation = 0
The teleporter's destination are the floor_trigger's coordinates.
When the party walks into the teleporter from elevation 0, the floor_trigger is activated.
But when the party falls into the teleporter from elevation 1, the floor_trigger isn't activated.
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Tue May 26, 2015 7:57 pm
by Komag
This might be related to the old Grimrock 1 "bug" of not teleporting when falling into a teleporter, at least it sounds kind of similar. I suppose you could always script it to forcibly work if necessary.
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Tue May 26, 2015 8:23 pm
by Azel
What about if the party falls in to the Teleporter from Elevation 2? I bet the trigger activates!
(i have not tested this yet)
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Tue May 26, 2015 8:26 pm
by Zo Kath Ra
Azel wrote:What about if the party falls in to the Teleporter from Elevation 2? I bet the trigger activates!
(i have not tested this yet)
Nice idea

But that doesn't work, either

Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Tue May 26, 2015 8:30 pm
by Azel
Invisible platform under the the Trigger, which gets removed as the last step after the trigger fires. That'll teach the greedy Teleporter a lesson

Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Wed May 27, 2015 12:12 am
by st1nger
hi
The trigger works fine, It is the teleporter what does not work.
The teleporter checks only horizontal axes/faces not vertical.
you have to script the teleportation yourself i think.
I think about a solution. That makes me curious
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Wed May 27, 2015 7:03 am
by st1nger
so thats my example for an solution.
not perfect, but it works.
Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Timer",
name = "falltimer",
timerInterval = 0,
triggerOnStart = true,
onActivate = function(self)
if party.party:isFalling() == true then
local ent
local tp
local tppos
for ent in party.map:entitiesAt(party.x, party.y) do
local checktp = ent:getComponent("teleporter")
if checktp ~= nil then
tppos = ent:getWorldPositionY()
tp = checktp
end
end
if tp ~= nil and tp:getTriggeredByParty() == true then
local x = tppos + 2
if party:getWorldPositionY() < x then
local l,x,y,z = tp:getTeleportTarget(l,x,y,z)
local x1, y1, f, l1 = party:getPosition()
party:setPosition(x, y, f, z, l)
spawn("teleportation_effect", l, x, y, f, z)
party.gravity:setFallingSpeed(0)
end
end
end
end
}
}
}
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Wed May 27, 2015 8:03 pm
by Zo Kath Ra
Thank you, that works very well

Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Thu May 28, 2015 7:16 am
by st1nger
when it works mark the topic with [SOLVED] please for other people with this problem.
like this for example: [SOLVED] Falling into teleporter doesn't work
Re: Bug: Falling into teleporter doesn't activate floor_trig
Posted: Thu May 28, 2015 3:12 pm
by Zo Kath Ra
st1nger wrote:when it works mark the topic with [SOLVED] please for other people with this problem.
like this for example: [SOLVED] Falling into teleporter doesn't work
Done. Had to change the topic title a little, because [SOLVED] didn't fit into it anymore.