Jump to content
Sign in to follow this  
dissaifer

Fsm - ?!?!?!

Recommended Posts

I'm trying to learn how to do FSM's and it is driving me a little insane.

I've searched the forums and usually there is old posts with dead links. I searched the DH and found some interesting stuff but no real 'meaty' stuff. The BIKI is ... lacking.

I'm trying to figure out the scope of variables and how to pass them in the FSM. I have a CS background so I already understand the concept of the FSM but I am trying to understand in the realm of Arma, specifically how it is used.

Most of the examples I have come across deal with groups of units, which I thought was odd because I thought the point of the FSM was at the unit level.

If anyone has any good links or mods I should tear open, please throw them at me.

Share this post


Link to post
Share on other sites

The guide in my signature shows a simple use of FSMs for 'proper' dialogue and the like :)

Share this post


Link to post
Share on other sites

Thanks for the reads guys, some were helpful. :)

Now, I have found something odd. I put together a fsm and put it on one guy. I use a doFSM command to run it. And it is fine.

Then I copy the guy, so two guys with the same FSMs, and I am getting an error that _target is undefined? I'm a little confused as to why.

Share this post


Link to post
Share on other sites

So, back on topic, does _target go out of scope if you go into a loop in a state?

How do you correct that?

Share this post


Link to post
Share on other sites

that depends on how you are passing _target in your fsm?

it might be that target is no longer alive, or simply doesnt exist at the time doFSM is used.

_soldierOne doFSM ["move.fsm", position player, player]

try it on an object like a static ammo box or something that is clearly there inside the mission.

i think you might have used your fsm guy as a target, which is why it isnt working.

Share this post


Link to post
Share on other sites

I was passing it...

like "this doFSM["yeahFSM.fsm", position this, this];

So, I guess I shouldn't be doing that. Which I guess means I should change all of my _targets to _units...

Share this post


Link to post
Share on other sites
I was passing it...

like "this doFSM["yeahFSM.fsm", position this, this];

So, I guess I shouldn't be doing that. Which I guess means I should change all of my _targets to _units...

i think the problem here is that you cannot use the guy the fsm belongs to as the target. It might be something that the FSM is a little anal about.

so maybe something like this doFSM ["FSMGU.fsm", position this, unit2];

where this is unit1,

see if that works

Share this post


Link to post
Share on other sites

I switched it to this doFSM["FSMGU.fsm", position player, player];

I'm not using position or target, so I figured it didn't matter, but I was running into an issue with execFSM and read something about moveTo and doMove, so I switched (probably a noob mistake).

I've actually changed the config fsm for danger and formation to "" and that seemed to work, but it seems like there is some either hardcoded or "things I'm not aware of" stuff still going on.

the FSMs are a little touchy. I have seen them stop... which shouldn't happen. Found a post called FSM editing where Suma stated the FSMs should be able to run the whole time.

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  

×