Forum rules - please read before posting.

Request: Completely bypassing Interaction objects

How hard would it be to eliminate the need for Interaction objects? I'm asking because I only use Interaction objects as bridges to custom code. Each of my hotspots is linked to Interaction objects that only have one single Action – a Send message Action with a call to my custom code. It could have been a lot easier for me to create a scene if a hotspot could be linked directly to custom code, completely bypassing the Interaction object and the Send message Action. Something like adding a third "Interaction source" type to the hotspot (on top of the current "In Scene" and "Asset File", let's call it "Custom Code" or "Custom Method", for instance, and when "Custom Code" is selected, the "Interaction" field in "Use Interactions", "Examine Interaction" and "Inventory Interactions" would change to "Object to affect" and "Method name" (like in the Send message Action).

This is not a must or urgent in any way, as I can still use the existing arrangement, but it could help me (and any other programmers who use AC via code) a lot in the future.

Thanks!

Comments

  • I can see how this would be useful, though - from a coding perspective - I'm not sure I could amend it without either resetting the Interaction source value, since that enum's used by many other editors.

    Curious to know why you're bypassing Actions completely, though.
  • I'm not bypassing Actions at all. I create Action Lists on the fly, I add the Actions to the Action Lists and I run the Action Lists - all from code. This way I have all my game behavior stored in code and not in assets. This gives me great flexibility, which, as a programmer, I've become accustomed to. Searching for a specific Action, for instance, when using the Actions in their intended form, is difficult. Checking diffs with previous versions when using source control is very difficult when the actions are stored in the scene or in asset files - even if you ask Unity to store them as text. As a programmer, I have many reasons to use code instead of editors. Bottom line, I use Hotspots and Markers on the scene but I keep all game behavior in code and I create and run Action Lists and Actions programmatically. Don't get me wrong, I perfectly understand why AC is designed the way it is - in order to make things easier for non-programmers - but I believe that those among us who are accustomed to code shouldn't be bound by this design. Giving a Hotspot the ability to directly call a function in code is a very nice way to cater to the programmer as well, in my opinion.

  • I'm sorry to resurrect this old thread but as I have a request that is very similar to the one discussed here, I thought I would do it here.

    So would it be possible to add a "Custom Script" Interaction source to the Conversation component in much the same way you did for the Hotspot? That change you did in the Hotspot serves me so well that I thought it would be great if it could be extended to the Conversation as well. The idea is to eliminate the need to use Dialog Option objects at all, in much the same way you did for the Interaction objects.

    And while we're on the subject, would it be possible to do something similar in Scene manager -> Scene cutscenes, so that I won't be obligated to create Cutscene objects for "On start", "On load" and "On variable change"? I mean, I could just place code in my scene's main script's Start() method to replace the "On start" cutscene but what would I do for "On load", for instance?

    Like before, this is not a must or urgent in any way but it would be great to have some day.

    Thanks!

  • I can certainly look into amending Convesations like that, but isn't all of this already possible just be having a custom Action in these various ActionLists that call your own script?  It does seem like this is a problem unique to your game.
  • I was just talking of making things easier on the programmer type. So that we won't have to create an action list and an action for every single dialog topic when all we wanted is to call our custom script. That, and making the Conversation object more consistent with the Hotspot object which already has this functionality.

    AC is, by design and purpose, mainly oriented towards the non-programmer type. My requests in this thread is a very nice way to cater to the programmers among us as well, in my opinion, those who just want to call custom scripts most of the time.

    Again, not a must but very nice to have. :)
  • Scene cutscenes won't be, but script calls from Conversation Dialogue Options are in for 1.43.
  • Many thanks, Chris!
  • Just right now I'm running into an issue that would be helped by a direct script call through a Hotspot. So thanks! Definitely looking forward to 1.43.
  • It's out - grab it while it's hot!
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.