[Suggestion] Activation variables for effectors
DrprofLuigi opened this issue ยท 10 comments
Basically, an effector would have "activationVariable" : "X" where X is any animation variable (that is 0 or 1), including doors and custom variables.
If this is defined, then the effector is only active when the defined variable is 1.
For example, a plow could have "activationVariable" : "Plow" and a vehicle could have a custom variable "Plow", that way the plow is only plowing when the Plow switch on the HUD is on.
If this is implemented, then I would also suggest adding a block breaker effector.
So, for the plow, you can actually do this with the current system. You'd simple make the plow-part move on the vehicle. Much like how farming equipment will raise their equipment decks when not in the field, one can easily make the plow/mowing/thresher do the same with a simple switch. Heck, you could even automate it, like if you shift into reverse the mower turns off.
I'm assuming this is what this ticket is for?
Also, I can indeed add a block-breaker effector, so you don't have to use collision. Though I'm not sure how you'd tell it what blocks to break.
I suppose an add-on suggestion would be that effectors could use collision boxes to determine how they interact with the world.
You could, though that could get icky with effectors like tow-behind farm implements, where the collision should be the whole implement, but only a swatch affects things. Is there a reason the "width-based" system isn't working for you?
I was thinking of making a trencher that digs a two-block deep trench for laying pipes underground. Plus having special collision boxes would be more intuitive and allow for more variety. Maybe have a tag like with boats, but instead of "floatsOnWater" it's "isEffector" or something.
Ah, gotcha. I could do that. Would at least be more intuitive than the blocksWide thing where most folks don't know what it is, or use it for that matter. I'm still for enabling/disabling being done by moving the actual part. You disable the trencher by taking it out of the hold, you disable the mower by lifting the cowling, and you disable the tree cutter by not running into any trees. If you want the ability to have block breakers, or hitbox-based effectors, I'd ask those be their own individual tickets. And if you're okay with moving the effector to turn it off, feel free to re-name this ticket.
For the disabling, I'm thinking of things with moving parts (like saw blades etc.), especially for possible block breakers where you wouldn't want to nick things. It would be similar to a PTO unit.
Weather they are active or not would depend on the defined variable. If there is no defined variable, they're always active.