Time Transition interrupted and FSM resetについて

Forum rules
Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Time Transition interrupted and FSM resetについて

Re: Time Transition interrupted and FSM resetについて

by CHOP_JZL » 2019/10/16 01:28

Hello!
Thank you for the answer. After I reproduce it myself, I noticed I made a big mistake. I used "stop state machine" after the Time gameobject is inactived, that's why the FSM didn't stop...In the mainmenu graph of your answer, I tried to just link "Time" node and "End TimeFSM" node, it still words, and the TimeFSM reseted properly. So the FSM actually can reset it self if it's active , my mistake...

Re: Time Transition interrupted and FSM resetについて

by caitsithware » 2019/10/16 00:02

Example 1 (Basic FSM) is a simple example and does not implement complex reset processing.

To implement reset, it is better to implement reset state by combining SendTrigger, TriggerTransition, PlayStateMachine, StopStateMachine.

For example, the following FSM.

MainMenu
Example_FSMReset_Time.png
Example_FSMReset_Time.png (124.62 KiB) Viewed 4537 times
Open

Time
Example_FSMReset_Time.png
Example_FSMReset_Time.png (124.62 KiB) Viewed 4536 times
Open

Main flow
  1. MainMenu FSM : In the Time state, activate the Time object and play the TimeFSM.
  2. MainMenu FSM : When the Back button is pressed, a "Reset" trigger message is sent to TimeFSM in the ResetTimeFSM state.
  3. Time FSM : Accept the "Reset" trigger with ResetTrigger in the resident state, and immediately transition to the Reset state.
  4. Time FSM : Performs reset processing in the Reset state and immediately transitions to the End state.
  5. Time FSM : Send "End" trigger to MainMenu FSM in End state.
  6. MainMenu FSM : Reset TimeFSM accepts "End" trigger and immediately transitions to EndTimeFSM state.
  7. MainMenu FSM : Stop Time FSM and deactivate Time object in EndTimeFSM state. Transition to MainMenu state.
By using graph hierarchies (SubStateMachine, EndStateMachine), you can build the best graph.
See Example 14 (Graph Hierarchy) for more information on graph hierarchy.
Attachments
Example_FSMReset_Time.png
Example_FSMReset_Time.png (124.62 KiB) Viewed 4536 times
Example_FSMReset_MainMenu.png
Example_FSMReset_MainMenu.png (136.98 KiB) Viewed 4537 times

Time Transition interrupted and FSM resetについて

by CHOP_JZL » 2019/10/15 14:05

Hello!
Today I was trying the Example 1(Basic FSM). In the Time example, if I press "back" when the cube is active, although I went back to mainmenu, the Time FSM still counting. Then when I press "Time" again, the FSM back to work from last time it stoped. So the cube will be active at the begining and become inactive immediately, which is not what I want.
Can I reset a FSM(timer, children active, etc) when get interrupted? Like the "back" button in Example 1. I tried "stop state machine", although I can restart FSM, the states data is not reseted...

Top