-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FSM Editor Config for CBA Statemachine #1263
FSM Editor Config for CBA Statemachine #1263
Conversation
For the end user, why is the Should this file instead be on the wiki? If it is included into the release, should it not instead be inside |
The reason I placed it here was due to the statemachine Example.sqf and Example.hpp being present here. I'm fine with placing it anywhere though. |
@BaerMitUmlaut ? ^ |
Great job, I wasn't aware this was possible with the BI FSM editor! I intend to use this config structure to build some more complex AI systems in a mod using the great state machine system set up by @BaerMitUmlaut. The two examples of the standard SM are shown on the wiki and various biforums posts so I think the config should be available via a wiki link in the hope of encouraging more regular usage of the CBA SM. |
I have tweaked this config with the intention of publishing configs directly from the FSMEditor. Saving in the .bifsm format preserves the FSM data for use in the editor, while saving the statemachine in the .fsm aka compiled format produces a CBA SM config. With this tweaked config: https://gist.github.com/PiZZAD0X/3b4ec1ae33cdbc76b3dc2626a5559772 A .bifsm of https://gist.github.com/PiZZAD0X/0d656d5a22453ec6c36b5340d4a184bb |
Question: class CombatStance {
onState = QUOTE(
DEBUG_TAG('Combat stance');
// Don't overide explicitly set stance
private _hasStance = _this getVariable [QQGVAR(hasStance), false];
if (!_hasStance && toLower (unitPos _this) != 'auto') exitWith {
DEBUG_TAG('Skip stance');
}; Does this work? There are newlines inside the macro (QUOTE()) argument. This should fail. |
Yes it does, but it works just fine throwing in the necessary \ Parser works fine with the \ Isn't best practice to throw these to a QFUNC instead of commands inside a quote inside config? |
Yeah, excessive script in config is bad, regardless of this. |
I added a barebone doc page for the statemachine that includes this: |
When merged this pull request will:
Included instructions
Example FSM:
Same FSM but as text:
https://gist.github.com/Freddo3000/244d94c0056f2b4afb0f52fec73a57a2
Once ran through pboProject:
https://gist.github.com/Freddo3000/eab4a2afd7a4ffcbc688bcf37ce7e91d
While it could be prettier, it does its job well enough.