Hey fellas,
for my Fortify-Mod I have recently been working on a working drawbridge. The main feature should be, that if the opened animation is triggered, the bridge should add a temporary collision-Box in front of it.
The wanted result is, that one can build this door in front of a river and enable hearthlings to cross that river without actually building a bridge (with a max river width of 4 blocks).
My first attempt is an if-claus like this:
{"if" : [{"==" : [{"var":"state"}, "opened"]}, "bridge", "no bridge" ]}
“bridge” and “no bridge” are placeholders for the whole collision-box thing. The “state” var should be filled with the active animation.
Now my questions:
- Is this even possible in json? Or is this a task for a lua file?
- Where to add the lines of code above? I guess in the “components” section, but I’m not quite sure.
Thank you for your attention.