Page 1 of 1

Transition with parameters

Posted: 2021/05/03 00:26
by ZeroX
Hello arbor team,

I am wondering if there are any transition with parameters?
Something like this:

Code: Select all

1, Transition (Dictionary <object, object> paremeters)
or

Code: Select all

2, Transition (params object [] parameters)
But personally I prefer way # 1 since being able to access the exact parameter by id and check for its existence.

And on OnBegin will be OnBegin (Dictionary <object, object> paremeters).
Either a way to access these parameters, such as the GetTransitionParameters () method or the TransitionParameters property.

And these parameters will be deleted when leaving the state.

I know in arbor3 there is ParameterContainer. But it would be troublesome to just add everything to it. It would be simpler and cleaner if it was possible to pass separate parameters for each state separately.

It would be great if we could Transition to Attack, Move, Jump, or EndGame with some special contextual config such as attackType, attackDirection, moveSpeed ​​(if empty, use default moveSpeed), jumpDirection, endGameResult.

Re: Transition with parameters

Posted: 2021/05/03 02:36
by caitsithware
Hello.
Thank you for your request.

Currently, Arbor3 can use value I/O via data slots.
Please refer to the manual for details. I have the following concerns about the method you requested.
  • The data flow function already exists.
  • The graph editor cannot see what parameters are being passed from which state.
  • It is necessary to write both Transition and receiving scripts on the user side, so it is only necessary to prepare user scripts for passing.
In light of the above, we will consider whether or not to introduce this feature.

Re: Transition with parameters

Posted: 2021/05/03 15:33
by ZeroX
Thank for the reply,
I hope this can be added in the future.
In my opinion this will help developers who tend to code StateBehavior and use arbor as a tool rather than using visual scripting instead of coding.