SuperCodeActionState = Actions + Code. Feedback appreciated.

NodeCanvas Forums Custom Nodes & Tasks SuperCodeActionState = Actions + Code. Feedback appreciated.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13513
    meatloaf
    Participant

    Hey guys, while building out a game flow state machine for our game, i found myself in a strange position with NodeCanvas. What I wanted was to be able to code out some specific things in a state but also wanted some of the flexibility that came along with the Actions in the inspector.

    I wen’t ahead and whipped a custom state up that will allow me to do this. The below is definitely a very rough idea of what I was thinking, but I’m curious of what your thoughts are and how i might be able to improve it.

    Thanks in advance!

    #13517
    meatloaf
    Participant

    Here’s an updated version of the above. I think this one is much better, yet pretty rough none the less.

    #13531
    Gavalakis
    Keymaster

    Hey, thanks for sharing.
    I am not exactly sure how this works, but it looks interesting as far as I understood 🙂
    I think it looks a bit more complicated that it could be though. Is the end goal to have tasks, but also code the state behaviour in combination?
    What is the difference from adding custom coded tasks in the SuperActionState directly? Within an action task, the OnExecute, OnUpdate and OnStop callbacks can be used to respectively code the OnEnter, OnUpdate and OnExit state calls.
    I’d be interested in more details 🙂
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #13898
    meatloaf
    Participant

    Haven’t had a chance to reply to this until now.

    In a lot of cases the SuperActionState in combination with ActionTasks makes a lot of sense. However right now one of my use cases is using NodeCanvas for the flow of my games states. In this case it is quite cumbersome to create a bunch of ActionTasks for the various things I want to do in each game state. Primarily I want to just code my states up with the various callbacks.

    However there is moments where it is useful to use ActionTasks along with my state code which is why I coded this up :). Here are a few images of how it looks working.

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.