[plugin] rex_gfsm, [behavior] rex_fsm

Post your completed addons to share with the community

Post » Sun Oct 09, 2016 4:52 pm

OK thanks. I was just curious as I did some tests and this did not work
"Condition: On FSM Transfer Logic" -> "Action: Wait 3 Seconds" -> "Action: Set Next State"

But this did work:
"Condition: On FSM Transfer Logic" -> "Action: Wait 3 Seconds" -> "Action: Go to State"

I just wanted to understand why the first method didn't work. Perhaps because as you said, the state needs to change on the "Action:Request" and the next state is not immediately available in the first method.

It's not that important though, thanks for the reply
B
15
S
5
Posts: 141
Reputation: 1,657

Post » Mon Oct 10, 2016 5:09 am

@SecondDimension

Sorry, I made mistake in previous post.

"Action:Request" and "Action: Go to State" are all used to change state to next state:
- The next state is in input parameter of "Action: Go to State".
- The next state of "Action:Request" comes from "Action:Set next state" under "Condition:On transfer logic". i.e
"Action:Request" -> "Condition:On transfer logic" -> "Action:Set next state -> go to next state
B
108
S
26
G
259
Posts: 4,430
Reputation: 145,679

Post » Thu Dec 01, 2016 6:09 am

Re-wrote document of this plugin, add a flow chart of state changing.
B
108
S
26
G
259
Posts: 4,430
Reputation: 145,679

Post » Thu Dec 01, 2016 1:43 pm

Decided to give this a quick go yesterday and now I'm wondering how the heck have I made it this far without using this. It makes my life so much simpler! Thanks for this behavior rex!
B
122
S
42
G
40
Posts: 846
Reputation: 27,994

Post » Thu Dec 01, 2016 3:35 pm

@andreyin

You are welcome, hope new document will be more clear.
I feel that my documents are short of flow charts, to describe the relationship between actions and conditions
B
108
S
26
G
259
Posts: 4,430
Reputation: 145,679

Post » Sun Aug 06, 2017 8:57 pm

What are the advantages of the FSM plugin and behavior in contrast with a text global variable that I can change its value/state ?
B
78
S
21
G
23
Posts: 513
Reputation: 18,623

Post » Mon Aug 07, 2017 3:08 am

@Cipriux

Sure this plugin/behavior could be replaced by global/local variable and c2 functions
- Add 2 level case-switch (if...else...) to determine next state
- 1 level for each possible current state, another level to decide next state

- Add some glue logic to trigger "exit previous state, enter current state" event (condition), or "on state changed" event, etc.


This plugin/behavior wraps the previous/current state (global/local variable), "next state" conditions, and state transition events (exit previous , enter current state, etc..) into an object (plugin). It might be more readable.
B
108
S
26
G
259
Posts: 4,430
Reputation: 145,679

Post » Mon Aug 07, 2017 5:31 am

@rexrainbow
Thank you for explaining it
B
78
S
21
G
23
Posts: 513
Reputation: 18,623

Previous

Return to Completed Addons

Who is online

Users browsing this forum: davidbox and 5 guests

cron