commandFSM – Talk

From Bohemia Interactive Community
Revision as of 18:47, 30 August 2006 by CrashDome (talk | contribs) (word fix)
Jump to navigation Jump to search

This entry is pretty meaningless without an explanation of what FSM files are... Nothing in the forums, nothing on the wiki. --MaHuJa 22:16, 22 August 2006 (CEST)


This entry is by no means meaningless. This command is listed by BI in their newest command reference which is still WIP (Work In Progress) Therefore the commands themselves are liable to change before the game is ready for release.

If you had bothered to read the disclaimer on the Scripting Commands ArmA Category page you would know this.

Planck 23:55, 22 August 2006 (CEST)

Ok I never heard of the term until the BIS Wiki sprung to life. So I did a quick search on the net and came across the term Finite State Machines (FSM). The site goes on to use Quake as an example:

Finite State Machines

I must admit I was a little disapointed, but thats probably down to me reading to much into what FSM means to Arma. I thought the FSM commands would add something very new to Arma scripting. But is it just going to make life a bit easier for those that don't already use the principle, which is not a bad thing BTW. But for the likes of myself and many more addon makers\scripters, will it allow us to do anything we couldn't already do with OFP?

UNN

It certainly is a "black box". My understanding from what's being said is that FSM is how they're defining AI behaviors, such as leapfrogging, and (another example from Placbo's RadioCheck gang-whatever) animal characteristics. Presumably, we can define our own states, and what to do in them: so we could have states say "Eating hamburger", "Playing Soccer", "Cruising Main Street for Girls". The next big question is: what are the inputs and outputs? Do we define relative attractors and repulsors? Can we get information such as "IsBeingShotAt", or even custom stuff such as "winkedAtbyHotBabe"? Dinger 13:08, 29 August 2006 (CEST)
Yes, I wouldn't be disappointed just yet. I remember glancing somewhere and seeing/hearing about it maybe being an event based FSM which would make sense. That is entirely speculation on my part though. It will make it easier and hopefully less CPU intensive to perform some complex tasks. I am guessing at this but I think it will be event-driven changes between states. If we can define our own states that is powerful stuff. --CrashDome 04:46, 30 August 2006 (CEST)
That’s what initially got me excited, but as I read more about FSM (outside of OFP) I started to think it would only use existing commands, like those already posted on the Wiki. But if Arma's FSM system has it's own internal set of commands and events, that may or may not be available outside the FSM blackbox. Then that’s a different thing all together. I'm using my own functions and events in OFP like IsBeingShotAt and IsBeingLookedAt e.t.c but it does require a lot of scripting to get to that point. So yeah, if that’s the case then it will be a huge step forward.--UNN 10:45, 30 August 2006 (CEST)
Good points, but take special note of the structure of the command. The two FSM commands we know of are commandFSM and doFSM just like doMove and commandMove. If you look at the two commands' examples you will see they order a unit to perform some sort of action as defined by an FSM file. There are also two additional parameters.. the target and the position. All the other "command" and "do" commands involve either a target or an object reference (hmm.. coincidence I think not). I am guessing, what you can do, is effectively order a list of actions (commandMove %position%, commandTarget %target%, etc..) using those two parameters within the FSM file. This is nothing new and is equivelant to many pre-defined scripts out there as you suggested, but I see one big possible difference: This is a structure of ordering a unit without the hassle of requiring "@unitready _unit" or time delay before executing the next command. Also, one doesn't have to worry about the leader of the group issuing a "Return to Formation" or some other command in the middle of your script and causing it to fail. Think of all the trouble scriptors originally spent trying to get an AI helo to fly to a destination and land properly, especially in MP. We have a solid script solution now as result of alot of people testing and collaborating, but it is messy for such a simple task and requires alot of code. In addition, another possible difference between FSM and a traditional script might be that these are more tightly broadcast within MP. All of what I said is speculation, but you have to admit two things: A) I'm probably really close to the truth and B) this is far better than using traditional scripting methods when ordering units around. --CrashDome 19:46, 30 August 2006 (CEST)