Forum rules - please read before posting.

prefab for default object interactions

Hi,
I am facing the problem that not every object in my game has a defined interaction and I would like to have a default set of interactions for each verb -I am using 9 verbs template from your site-. 

I was trying to use prefabs for this. The idea is to create a prefab with the default interactions and then create every object of the game from this prefab and after creating it break the prefab instance to make it independent.

Does this make any sense? Is there any other workaround?
Thank you.

Comments

  • There's a couple of ways you can do this:
    1. Rely on unhandled interactions, which run if a specific interaction isn't defined on the Hotspot itself.  You can defined an unhandled interaction for each verb within your Cursor Manager.  If you create one for e.g. "Look", then this will run unless you define a "Look" interaction on a Hotspot
    2. Following your suggested method, create a new Hotspot prefab (don't overwrite the original) that has its Interaction source field set to Asset File.  When creating new Interactions within the Inspector, you can then refer to ActionList assets, rather than scene-based Interaction objects.
  • Hi, I am trying the first method you mention. Is it possible with this method to be able to set a walk to marker option for the verbs? How can this be achieved?
  • Not currently, but I can add this feature by extending the parameters system in the next release - at which point I'll update this thread with the necessary steps.
  • v1.56d is now out, and adds a new feature to assist with this: if the Character: Move to point Action's Marker to reach field is set by a Hotspot via a GameObject parameter, then that Hotpspot's Walk-to Marker will be relied on instead.  Therefore, try this:
    1. In your Cursor Manager, check Pass Hotspot as GameObject parameter? under the list of defined cursor icons.
    2. In each of your ActionList assets for your unhandled interactions, create a new GameObject parameter (see the tutorial linked above)
    3. Create a Character: Move to point Action and Character: Face object Action, and link the Marker to reach and Object to face fields respectively to this new GameObject parameter.
    4. These fields will now be set to the Hotspot's Marker and Hotspot respectively when run in-game.
  • edited March 2017
    I followed the steps with no success.image You can see it here. Can you spot anything wrong? (The Pass Hotspot as GameObject parameter is checked).

    image

  • Check Wait until finish? in both Actions.  Currently your game is returning to gameplay - and under the player's control - before they can finish running.
  • That worked, thanks! :)
  • What could we do if we want to use the same texts for in scene object interactions and inventory interactions? In the scene we have to use Interactions but in the inventory we can only use List Actions. We would like to avoid as much as possible to repeat/rewrite texts.
  • edited April 2017
    Use actionlist Assets instead of in-scene actionlists/cutscenes. Just right click on your project window, go to the Adventure Creator option and you can make some there. Actionlist assets are reusable, so you can use the same one for any feature that requires an actionlist. Just remember that in hotspots or triggers you will need to specify the source are assets files (default is in-scene). You can also use Actionlist Assets inside other actionlists by using the Actionlist:Run action, so, if the interaction and inventory interactions differ a bit in logic, you can just run the asset with the dialogue actions using the Actionlist:Run action, but still keep the rest of the logic different.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.