GameplayBehavior and SmartObjects with Players (rather than AI)

I’m following the various tutorials to make AI characters sit on things utilizing Smart Objects with Gameplay Behavior. This is all working fine, and AIs walk around and claim Smart Object slots to sit in. Now, of course the Player Character should be able to sit in the same slots. And while the docs explicitly say that Smart Objects can be used with Players, I can’t seem to find a single tutorial doing this. So:

  1. If we control a character, it’s likely that we already know the slot to interact with, e.g. because the player clicked on it. So there’s no point in using “Find Smart Objects”. What other ways are there to look up and get hold of the Slot Handle, e.g. when we already have the Actor and Smart Object component in it?

Ignoring the ugly implementation, I’ve played with Find Smart Objects from the player, and in theory I can find the Slot Handle by making the search box small and hoping for the best, but even then I’m unsure how to proceed:

  1. For an AI, we can use “Move To and Use Object with Gameplay Behavior” or “Use Claimed Smart Object”, but that requires an AIController. What is the version with a regular Player Controller? From having the slot handle, I don’t even see a path to obtaining the associated Gameplay Behavior. From there it seems possible to call “Trigger Behavior”, but we would still need to implement the release of the slot. I’d expect there to be a similar convenience method as for AI.

Any help or link is appreciated, including speculation. This seems fairly new and partially experimental, so maybe the docs are lagging behind.

Hello, did you figure this out?

Also looking info on this!

This is something we are currently working on having an engine supplied solution to do. It is in our public roadmap for the future: Smart Object Player Interactions

You can get this to run now, but it will require some fine tuning in your project to make it work smoothly. The player interaction is much like the AI in that it needs to find the SmartObject and open slot, claim the slot, and then execute the gameplay behavior once it is in place. The issue with the player is that you also need to handle any player inputs (or if they should be allowed while using the Smart Object) as well as stopping the behavior and freeing the slot if it is cancelled.

1 Like