Pigs will tree to chop down trees regardless of which tool you use, when you're spinning. And they won't ever register a spin as an attack action to start attacking something.
Possessed Chassis will instead not register anything when you're spinning, only when walking up to something with a buffered action (or remote sent action for when client prediction is enabled), so long as the action matches what their equipped tool/weapon can do (i.e. walking up to spin against a tree while they have an axe equipped). They will also try to attack things in the same way, as you're walking after clicking to attack something, but while spinning they'll try to stay away from hostiles.
It's obviously not intended to work like this, but besides addressing it, it should also be consistent with other creatures capable of doing work actions (i.e. Pigs processing spinning as chopping down trees).
As a way to make it consistent and more intuitive, maybe have it so whatever action started the spin action is what's used as reference? So starting a spin by:
- Trying to chop down a tree = spin counts as a Chop action.
- Trying to mine something = spin counts as a Mine action.
- Trying to attack something = spin counts as an Attack action.
- Etc.
I also personally don't mind this, but if you'd like to make work-spin actions not target neutral entities, that's something to consider as well.
Lastly, something else I noticed is that, as noted earlier, the Possessed Chassis can act based on the buffered action (or remote action with prediction) on the player. This is different from how any other follower works, so I thought I'd point that out (though I can understand if it's intended, as they do stop the moment their logic updates after you've cancelled the action).
Checked before posting this report, and noticed that the spin states don't set inst.sg.statemem.action, unlike attack actions, work actions, and a few others:
local function GetLeaderAction(inst) local target local act = inst:GetBufferedAction() or inst.sg.statemem.action if act then target = act.target act = act.action elseif inst.components.playercontroller then act, target = inst.components.playercontroller:GetRemoteInteraction() end return act, target end
And both their brain and SG check like this.
So, inst.sg.statemem.action might actually fix most of these issues, if not the whole thing. Still unsure why Pigs would end up trying to chop down trees regardless though. I'll do some testing and report back when I can.
With a Spin-Cycle circuit plugged in, try the following:
With a Pig follower:
- Try attacking something while wielding something you can spin-attack with.
- Notice how the Pig won't attack at all, even when you land a hit (unless you get hit, which is unrelated to this).
- Repeat the first step while near a tree.
- Notice how the Pig will try to chop it down.
- These steps can be repeated while trying to pick/mine/hammer something and it'll also result in the Pig trying to chop down trees.
With a Possessed Chassis follower:
- Try attacking something while at some distance away (click to Attack and let your character walk up to it). This will result in it trying to attack.
- Notice how upon starting to spin, the Chassis follower will stop attacking.
- Repeat these steps but with work actions (ensuring the Chassis follower has a matching tool). This will result in it trying to do appropriate work.
- Notice how upon starting the spin, the Chassis follower will stop doing work.
I tested these both with client prediction on and off, and from what I do noticed from some looks at the code, client prediction is accounted properly and things are consistent regardless of that, so the issues lie elsewhere. Though I did notice that with prediction on, the spin struggles to even start if trying to attack an entity who is moving away from you, even if holding the attack key.
-
1
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now