Jump to content
Sign in to follow this  
leob

Scripted FSM indefinite conditions

Recommended Posts

Hello, I got a quick question on scripted FSMs.

I got the FSM Editor from BIS Tools. I wanted to create a follow-me fsm-script. So a unit follows another unit and also

enters/exits the same vehicles as the first unit does. Fortunately the last ArmA3 campaign mission features such a script called journalist.fsm. (As some might recall)

So at a particular stage/state in the script the FSM does a distance check to find out wether the follower should be running or just walking.

So the conditions are: distance > 3 , distance > 10 , true

Let's say distance is 15. Will both distance conditions be true and following states executed? That would not make sense in this case because the unit can't run and walk at the same time.

And what about the true-condition? Will it also be executed alongside the distance-conditions all the time?

If so, which condition decides that a specific state (in this case the state "distance check") is finished and no other code/condition following that state should be executed anymore?

I hope i could clarify my question.

FSM_snippet.png?raw=1

Edited by LeoB

Share this post


Link to post
Share on other sites

Each condition has priority param. If both conditions are true the route with higher priority will be taken.

Share this post


Link to post
Share on other sites

Thanks for the quick reply! So a state can only lead into one branch, got it, thx.

Share this post


Link to post
Share on other sites

A other solution would be <= 3m, wouldn't it?

Share this post


Link to post
Share on other sites
A other solution would be <= 3m, wouldn't it?

Which is what the TRUE condition is, I would presume the TRUE condition has the lowest priority so if it not > 10 and its not > 3 then TRUE -> watch player.

Share this post


Link to post
Share on other sites
Which is what the TRUE condition is, I would presume the TRUE condition has the lowest priority so if it not > 10 and its not > 3 then TRUE -> watch player.

Yes that's true, the only difference would be that it doesn't rely on the priority.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×