Forum rules - please read before posting.

[Feature Request] Convert Actionlist to Code (approximately), or give a hint on the equiv.code

edited November 2019 in Engine development

Hi there!

I know it's definitely a very time consuming addition, but it's not the first time I'm able to create something via Actions, when I stumble into something that is not already there.

So I'd either have to

  • build custom action
  • trigger an event on a gameobject, via the Unity Event System
  • write everything via code.

I appreciate the fact that in many places I can see in very handy helpboxes what's the syntax for accessing some variables, so I was thinking that it would be helpful to have a "enable code hints" option in the ActionList editor.

I'm not talking about a 1:1 code conversion, but at least some contextual line or small hint/snippet per action which helps to port each action to code, mentioning a specific class, or such.

Or, more directly, a "go to source code/go to script" for every action, in the contextual menu of each action.

So, it opens (or only selects in the Assets tab) the appropriate source script contextually, maybe also positioning the caret on the Run section.

In this way we could also better appreciate the source code docs without having to do some guesswork about which script contains which action (sometime it's obvious, sometime it requires some guessing).

That would surely help the user save some time, and should reduce the "how do I do that" frequency of the posts in the forum. (I'm guilty of this, I know :) ).

Maybe, add a "Show Action Source"/"Ping Action Source Script" button here?

Comments

  • I don't feel that you need do anything so drastic as to write an entire AcionList through code just because you have need for one custom Action. AC's own Object: Call event and Object: Send message Actions can be used to trigger custom script functions if you want to avoid writing custom Actions.

    The Actions Manager can be used to determine which script houses which Action, but also bear in mind that Actions themselves rarely do much beyond call other (non-Action) script functions. The Dialogue: Play speech Action, for example, mainly just calls the Dialog script's StartDialog function. All such functions are documented and listed in the Scripting Guide.

  • Yes, I agree, that's why I wrote a custom "CustomScript" action with pluggable code, as sending more messages to the same object (and I didn't want to create child object just for this) could be problematic when you have to send a message such as TurnOn (for instance), which could affect more than one object. The Unity Event... I'm not a big fan of it even outside AC, due to the way it works ^^

    The actual proposal was to just be able to ping (or open) the source of an Action node for easy reference. I added a very verbose premise to that ^_^"

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.