Jump to content

Recommended Posts

@kavaline

Inspecting anything, including players, happens in ACTIONS.LOOKAT and is piloted by the player's playercontroller component.

What you want to do will most likely reside in either of those cases.  Your use case will vary depending if you want to run things on the client versus server, and whether or not you want to interfere with it doing something or not.

@CarlZalph

My idea is, every time that my character inspects another player character, he will receive 1 sanity per inspection, as a test. It will be their power, so, have server commands, but that affects only that char. I need a trigger to him, was wondering if have some event called on inspecting, would solve my problem. I will read more about ACTIONS.LOOKAT to search something

7 hours ago, kavaline said:

My idea is, every time that my character inspects another player character, he will receive 1 sanity per inspection, as a test. It will be their power, so, have server commands, but that affects only that char. I need a trigger to him, was wondering if have some event called on inspecting, would solve my problem. I will read more about ACTIONS.LOOKAT to search something

Ah, well that's easier to do since it's an after-the-fact thing.

Hook ACTIONS.LOOKAT.fn and if the first return value is true, then you know it was successful.  Then check `if act.target and act.target:HasTag("player") then` to do your stuff in the posthook area.

You can read on how to function hook here:

 

  • Like 1
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...