One, I noticed that the model is offset by half a tile or so (and it also doesn't rotate with the facing direction...), and I'm wondering if there's a way to change the model coordinates for this new class.
Two, inheriting PressurePlate requires defining both an activateAnim and a deactivateAnim. And when I've tried to set the dungeon_pressure_plate_down/up animations to these values, the editor will (on first trying to open the dungeon) give me the error:
[string "PressurePlate.lua"]:0: Could not find asset processor for file: ...dungeon_pressure_plate_down...
and on the second try crash.
I have tried setting the animations to each of the following variations with the same results:
dungeon_pressure_plate_down
dungeon_pressure_plate_down.animation
assets/animations/env/dungeon_pressure_plate_down
assets/animations/env/dungeon_pressure_plate_down.animation
Does anyone possibly have any idea what I might be doing incorrectly? Please find some sample code below (the project loads and works fine without the following definition):
Code: Select all
defineObject {
name = "dungeon_fake_stairs_down",
class = "PressurePlate",
model = "assets/models/env/dungeon_stairs_down.fbx",
placement = "floor",
replacesFloor = true,
silent = true,
activateAnim = "dungeon_pressure_plate_down", --assets/animations/env/
deactivateAnim = "dungeon_pressure_plate_up", --assets/animations/env/
}Edit: I was able to fix the second part with the following format for the animations (with the .fbx suffix) and by defining editorIcon: "assets/animations/env/dungeon_pressure_plate_down.fbx". Still need help on offsetting the model though, if anyone has any ideas?
Also, is there any way inside this definition to initialize triggeredByMonster and triggeredByItem to false? I added the following lines, but they did not have any effect:
Code: Select all
triggeredByMonster = false,
triggeredByItem = false,