Thanks for looking into this. To make sure we are both seeing the exact same thing, below is a very simple test dungeon I made specifically to show you the issue.
Code: Select all
-- This file has been generated by Dungeon Editor 2.1.18
--- level 1 ---
newMap{
name = "Unnamed",
width = 32,
height = 32,
levelCoord = {0,0,0},
ambientTrack = "dungeon",
tiles = {
"beach_ground",
"beach_ground_grass",
"beach_wall",
}
}
loadLayer("tiles", {
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,1,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
})
spawn("starting_location",13,16,2,0,"starting_location_1")
spawn("beach_grass_pressure_plate",13,2,0,0,"beach_grass_pressure_plate_2")
beach_grass_pressure_plate_2.floortrigger:setTriggeredByParty(true)
beach_grass_pressure_plate_2.floortrigger:setTriggeredByMonster(false)
beach_grass_pressure_plate_2.floortrigger:setTriggeredByItem(false)
beach_grass_pressure_plate_2.floortrigger:setTriggeredByDigging(false)
beach_grass_pressure_plate_2.floortrigger:setDisableSelf(true)
beach_grass_pressure_plate_2.floortrigger:addConnector("onActivate", "brain_scr", "plate1Activated")
spawn("trickster",21,3,3,0,"trickster_1")
trickster_1.brainScript:setSource("")
spawn("script_entity",0,0,3,0,"brain_scr")
brain_scr.script:loadFile("mod_assets/scripts/brainTest.lua")
spawn("forest_heightmap",1,0,0,0,"forest_heightmap_1")
spawn("forest_day_sky",1,0,1,0,"forest_day_sky_1")
spawn("forest_ruins_wall_01",15,16,3,0,"forest_ruins_wall_01_1")
spawn("beach_grass_pressure_plate",13,17,3,0,"beach_grass_pressure_plate_1")
beach_grass_pressure_plate_1.floortrigger:setTriggeredByParty(true)
beach_grass_pressure_plate_1.floortrigger:setTriggeredByMonster(true)
beach_grass_pressure_plate_1.floortrigger:setTriggeredByItem(true)
beach_grass_pressure_plate_1.floortrigger:setTriggeredByDigging(false)
beach_grass_pressure_plate_1.floortrigger:setDisableSelf(false)
beach_grass_pressure_plate_1.floortrigger:addConnector("onActivate", "brain_scr", "plate2Activated")
spawn("forest_ruins_wall_01",14,17,1,0,"forest_ruins_wall_01_2")
spawn("forest_ruins_wall_01",14,18,1,0,"forest_ruins_wall_01_3")
spawn("forest_ruins_wall_01",15,19,3,0,"forest_ruins_wall_01_4")
spawn("forest_ruins_wall_01",14,20,1,0,"forest_ruins_wall_01_5")
spawn("forest_ruins_wall_01",15,21,3,0,"forest_ruins_wall_01_6")
spawn("forest_ruins_wall_01",15,22,3,0,"forest_ruins_wall_01_7")
spawn("forest_ruins_wall_01",14,24,1,0,"forest_ruins_wall_01_8")
spawn("forest_ruins_wall_01",14,25,1,0,"forest_ruins_wall_01_9")
spawn("forest_ruins_wall_01",14,26,1,0,"forest_ruins_wall_01_10")
spawn("forest_ruins_wall_01",15,27,3,0,"forest_ruins_wall_01_11")
spawn("forest_ruins_wall_01",15,28,3,0,"forest_ruins_wall_01_12")
spawn("forest_ruins_wall_01",15,29,3,0,"forest_ruins_wall_01_13")
spawn("forest_ruins_wall_01",15,30,3,0,"forest_ruins_wall_01_15")
spawn("trickster",20,18,3,0,"trickster_2")
trickster_2.brainScript:setSource("")
spawn("castle_door_wood",15,16,1,0,"castle_door_wood_1")
spawn("castle_door_wood",15,17,1,0,"castle_door_wood_2")
spawn("castle_door_wood",15,18,1,0,"castle_door_wood_3")
spawn("castle_door_wood",15,19,1,0,"castle_door_wood_4")
spawn("castle_door_wood",15,20,1,0,"castle_door_wood_6")
spawn("castle_door_wood",15,21,1,0,"castle_door_wood_8")
spawn("castle_door_wood",15,22,1,0,"castle_door_wood_9")
I also use an external LUA file for my brain code. brainTest.lua:
The level has two sections. The 1st section is used to show that seesParty works fine when walls are in between the mob and the party. My code will disable the brain as soon as the party is seen. For this test, this is at cords: 11, 6
In the 2nd section, I have both forest_ruins_wall and castle_door_wood Door objects instead of walls. Both are not sparse. You will see the mob see the party thru these doors at or near 16, 20.
Please let me know if you can re-create the issue.
I decide to see if "partyLastSeen" was having issues as well. I confirm it was in a similar but actually more concerning way. Most of the time when the mob sees the party in error, it somehow is reports seeing him for 0 seconds! I am talking 0 to the nanosecond. And that makes no sense considering another turn had to have gone by. Look at my code where I keep track of when he is first seen and compare it to when he stops seeing the party. Below is a new version of my brainTest.lua. I think this is more revealing that something is not right...