Forum rules - please read before posting.

Creating custom Action Categories.

edited July 2016 in Technical Q&A
Hi, I have a question! 

Basically, one of my projects has reached the point in the development process, where I feel I need to start adding custom AC actions which incorporate all the extra stuff I coded. To facilitate their use (else I'd have to use tons of Object:send message actions and that just won't cut it). 

Anyways, it'll be the first time I make custom actions, and I was just wondering, can we create more categories? I don't see it mentioned in the tutorial pages... I've seen some custom actions create new categories inside the Custom category, but I don't know how to do that either. Is there no other choice other than to stick inside the default Custom category to organize the new actions?

If possible, I'd like to use my own categories' names, cause I'll probably have a lot of custom actions for many different usages. At the very least I'd like it if someone could explain to me how to make other categories inside the default Custom category.

Anyways, as usual, any advice will be greatly appreciated.

Comments

  • You can't add your own category names, but you aren't limited to all custom Actions being categorised as Custom - you can use the included types as well (Engine, Player, Sound etc).

    Open the ActionTemplate file, and you'll see that it's category is set as Custom in it's constructor:

    category = ActionCategory.Custom;

    Copy this into your own Action's constructor and amend as desired.
  • Thanks! I'll do that then. But, if it's not game breaking, a little scripting tutorial on how to add more categories would be cool too, heh 
  • The problem is that it requires amending the Enums.cs script, which needs to be re-imported when you update - and will then potentially break your Actions.  Safer to stick with the provided ones.
  • edited July 2016
    Alright, no problem then.   :)
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.