• We'll be making a number of structural changes to the forums on Wednesday, 06.12.2023. No downtime is expected. Read more here.

BL Coding [1.1.5] StandPoint not detecting agents

Users who are viewing this thread

Gess1t

Recruit
I have been struggling to make UsableMachine work these past few days, eventually, i got them to start ticking, but now, i'm looking for why standpoints don't work.

I have tried making my own StandPoint based class to only allow interactions from the main agent, but no matter the StandPoint component used, they never detect any agents.

I tried all available StandPoint based components, none of them work.
I also tried copy pasting objects used as Stand points into my own object, tweaking settings that were deemed necessary, but still, they do not detect any agents.

Currently, i'm short on ideas on how to make those work.

Code:
public class StandingPointForMainAgent : StandingPoint
{
    protected override void OnInit() => base.OnInit();
    public override TickRequirement GetTickRequirement() => TickRequirement.Tick | base.GetTickRequirement();
    public override bool IsDisabledForAgent(Agent agent)
    {
        if (agent == null || agent.IsMainAgent == false)
        {
            return true;
        }
        return base.IsDisabledForAgent(agent);
    }
}

This is the class i tried using to restrict the interaction to the main agent. IsDisabledForAgent() is never called.

Here is the current state of the tree for the prefab i want to add interactions to:

ivVq10f.png


and here is some of the settings for the entity that's supposed to serve as standpoint copied from the arrow barrel and stone piles

3wVIblT.png


And here is the relevant part of the settings for the root / parent entity

Mai7EEQ.png


As you can see, nothing unusual, yet for some reasons, this standpoint does not seem to detect players, as the HasUser & UserAgent properties never state that an agent is using the standpoint, you can try moving on it, jumping on it, crouching, it will never detect the player.
The standpoint itself is placed at the same Location as the root.

Any ideas on how to make it work?
 
Last edited:
Solved it, A physic body was required on the owner of the UsableMachine script to make it work, this isn't stated anywhere
 
Upvote 0
Solution
Back
Top Bottom