Page 1 of 1
Plate triggered by Flying Monster
Posted: Tue Apr 23, 2013 1:19 pm
by Damonya
Again me. I know I open too much topics, right now, and maybe some have to find me boring.
Here is my problem. I have a hidden plate and for my puzzle, I have need, the plate triggered only by monster. But when the monster is a flying monster (like a shrakk_torr), the plate is never triggered.
Someone has already encountered this problem? Is this a limitation of the game or we can bypass it?
Re: Plate triggered by Flying Monster
Posted: Tue Apr 23, 2013 2:17 pm
by alois
Damonya wrote:Again me. I know I open too much topics, right now, and maybe some have to find me boring.
Here is my problem. I have a hidden plate and for my puzzle, I have need, the plate triggered only by monster. But when the monster is a flying monster (like a shrakk_torr), the plate is never triggered.
Someone has already encountered this problem? Is this a limitation of the game or we can bypass it?
You can do the following: set a timer, with a small time interval (say: 0.1 seconds) which, when activated, launches a lookForMonster() function in a script, and then reactivates itself. The lookForMonster function is something like
Code: Select all
function lookForMonster()
for entity in entitiesAt(party.level,x,y) do -- here x,y are the coordinates of the location where the monster has to be
if (entity.name == "shrakk_torr") then
-- do whatever you need to do
end
end
end
Note that you do not even need a pressure plate
You can activate the timer with an hidden pressure plate when the party enters the room, and deactivate it when it leaves the room.
alois

Re: Plate triggered by Flying Monster
Posted: Tue Apr 23, 2013 2:39 pm
by Damonya
Ok thank you once more alois, I would never have thought to do it like that. So problem solved.

Re: Plate triggered by Flying Monster
Posted: Tue Apr 23, 2013 3:00 pm
by Diarmuid
An onMove hook in the shrakk torr would be more efficient and less error-prone (they move very fas and I have had trouble with Shrakks and timers...).
Re: Plate triggered by Flying Monster
Posted: Tue Apr 23, 2013 3:37 pm
by Neikun
You could just clone the monster and set flying = false.
I don't know what that will mean for pits, though.