Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 50

Thread: FSM editing

  1. #11
    It is always an assumption that one versus many is going to be better when you cannot compile before hand. This is assuming it needs to compile or read the file each call. What type of difference this makes is not known.

    Quote Originally Posted by [b
    Quote[/b] ]CrashDome
    great job on the tute
    Don't thank me! I didn't write it

  2. #12
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,410
    i just realized, that my logic regarding proof, that you can't run multiple FSM files, is seriously flawed :-)
    In the example i gave, the termination of previous FSMs can be happening because we are trying to run agan same FSM file for same unit.

    ...however, i think that its impossible to run multiplne FSM files - why would you do that anyway?
    Running multiple FSMs for the same object is ...contraproductive? contradictory to the purpose of FSM, in one word - a nonsense.
    Or maybe i am too blind to see why would anyone wanted to do such thing.


    Question: Is there any way of passing more parameters/variables to the FSM?
    Anything other than what is available through _units, _unit, _destination, and _target?

    So far i was able to devise only one primitive workaround, by creating a global array named 'somearray#'. Then i fill this array with desired values of desired types, and then i run the FSM while substituting one of the _destination array elements with the number #.
    The FSM can then run some function which will take this # from the _destination array, and through "call compile" accesses the array 'somearray#'.

    Any other ideas?
    MSI P55-GD65 | Core i5 750 @ 2.67GHz | 4GB DDR3 | ATI HD 5970 (Asus EAH5970​/G​/2DIS​/2GD5) | OCZ Revo 120GB PCIe SSD | 2x OCZ Vertex 4 120GB |
    Windows 7 64bit Home Premium | Catalysts 13.1 | ArmA2 OA 1.62.0.101480 (beta) +BAF +PMC +ACR | ArmA2 1.11.0.86734 | ArmA 1.18.0.5281 | OFP 1.0.0.96

    Be smart, use Sprocket!

  3. #13
    Quote Originally Posted by (5133p39 @ June 19 2007,00:51)
    i just realized, that my logic regarding proof, that you can't run multiple FSM files, is seriously flawed :-)
    In the example i gave, the termination of previous FSMs can be happening because we are trying to run agan same FSM file for same unit.

    ...however, i think that its impossible to run multiplne FSM files - why would you do that anyway?
    Running multiple FSMs for the same object is ...contraproductive? contradictory to the purpose of FSM, in one word - a nonsense.
    Or maybe i am too blind to see why would anyone wanted to do such thing.


    Question: Is there any way of passing more parameters/variables to the FSM?
    Anything other than what is available through _units, _unit, _destination, and _target?

    So far i was able to devise only one primitive workaround, by creating a global array named 'somearray#'. Then i fill this array with desired values of desired types, and then i run the FSM while substituting one of the _destination array elements with the number #.
    The FSM can then run some function which will take this # from the _destination array, and through "call compile" accesses the array 'somearray#'.

    Any other ideas?
    I use created HeliHEmpty invisible helipads and setVariable on them, and I put these HeliHEmpty as "_target" of FSM. This for SP missions, for MP it could be tricky as variables attached to objects through setVariable are local only. OTOH FSM are not supposed to run on clients's PC You don't want to replace human logic by FSM ones, as stupid a player can be

    My issue at the moment is that using <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group move position [/QUOTE] on FSM _units&#39;s group doesn&#39;t work. I hear the leader ordering the "move to XXX", but no one moves



    Whisper / Kalbuth / MrK
    ex-OFrP member.
    ArmA3 / Planetside 2, member of MercenaryS
    Planetside / ET:QW / Tribes Ascend, member of Formido Clan

  4. #14
    @5133p39

    You are absolutely correct. You wouldn&#39;t want the headache with trying to run multiple FSMs. Also, there is some behavior changes in regards to coding with FSMs and these are not scripts which can be run in parallel and loop consistantly. It is not the purpose.

    @whisper

    FSMs can be run on client PCs. Remember that your group of AI units are local to you.

    Do NOT use doMove or move in an FSM. The reason they are not moving is because Move creates a waypoint and all waypoint following is suspended in an FSM while doMove will instantly terminate your FSM. Use moveTo or setDestination.

  5. #15
    Right, gonna dig into this setDestination, but its parameters are really strange. Any better description than Biki&#39;s one?
    I ask cause once I&#39;m @home able to edit a bit, I don&#39;t have access to Internet and I&#39;m completely blind, no comref, no Biki, searching in the mist, so any bit of advice is welcome beforehand

  6. #16
    Quote Originally Posted by (whisper @ June 19 2007,09:47)
    Right, gonna dig into this setDestination, but its parameters are really strange. Any better description than Biki&#39;s one?
    I ask cause once I&#39;m @home able to edit a bit, I don&#39;t have access to Internet and I&#39;m completely blind, no comref, no Biki, searching in the mist, so any bit of advice is welcome beforehand
    I answered your ? at OFPEC which might give you headway, but I&#39;ll reiterate here in a diff way:

    Try using your FSM to create a waypoint structure rather than controlling all movement at all times. I found you can create a whole series of waypoints that the AI will promptly follow once you kill you FSM. Now, I believe that some waypoints you can even attach another FSM using setWaypointStatements command.

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#91;grp,2&#93; setWaypointStatements &#91;&#34;true&#34;, &#34;grp doFSM &#34;&#34;MyFSM.fsm&#34;&#34;;&#34;&#93;[/QUOTE]

    i.e. when the above waypoint is reached (and set &#39;true&#39; by waypoint condition) the FSM will engage. I have not tested this myself, but might provide you insight.

    My whole point is to - instead of disregarding waypoints and trying to control everything yourself - use the FSMs as a tool to make the AI behave and create/use the waypoints properly.

    Also, setDestination I think is more for formation behavior and things like flanking/combat maneuvars because you need to set it for each individual unit.




  7. #17
    Thanks a bunch, I gonna try that tonight.

  8. #18
    It works flawlessly now (well, 1% of the work is now done, I now can go on completing the other 99 )

    Thank you CrashDome




  9. #19
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,410
    It seems the orderGetIn command interrupts my scripted FSM.

    I need the unit to get in a vehicle, while the FSM is running.
    I hate the idea of spawning a script only to wait until the unit is inside the vehicle to run the FSM again.
    Any usable workaround?

    EDIT: now that i am thinking about this problem, it seems logical - the FSM was initialy run for a MAN, but when this man gets into a vehicle, he becomes "something else" - he becomes a VEHICLE, so it seems logical that the old FSM will end because vehicles often need to be treated differently.
    Therefore i think it&#39;s not possible to prevent stopping of the previously run FSM - it seems to be on purpose. I need only some reliable way to start new/same FSM after the original one is stopped.

    Maybe some special named state exists, which, when present in the FSM file, is being used when the FSM execution is interrupted?




  10. #20
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,410
    Quote Originally Posted by (5133p39 @ June 29 2007,08:46)
    It seems the orderGetIn command interrupts my scripted FSM.

    I need the unit to get in a vehicle, while the FSM is running.
    I hate the idea of spawning a script only to wait until the unit is inside the vehicle to run the FSM again.
    Any usable workaround?
    I need help with this.

    I made a workaround - i am stopping the FSM myself when a unit is about to get in or out of a vehicle, and before stopping the FSM i spawn a script which waits until the unit gets in or out of a vehicle, or until a 10 seconds timeout runs out (could be less, maybe, but i better be safe than sorry), and then it will start the FSM again.

    The problem is, everytime this happens, the unit is just standing/sitting and doing nothing for 10 seconds, which is little awkward.
    I tried the unitReady command, but it doesn&#39;t help - either it&#39;s functionality is disrupted because of the doFSM or other commands i used, or it won&#39;t help simply because the unit is in middle of something (a MoveTo which it hasn&#39;t completed yet).

    I need some reliable way to determine when it is safe to run the FSM again - if i run it too early after the unit&#39;s get in/out action, it will be still stopped by something unknown (by native FSM?).
    The 10 seconds delay works, but i don&#39;t want any unnecessary delay.

    Please, give it some thoughts, i really really need help with this.
    (It would be VERY nice if we could get at least a little comment from the developers, regarding this issue)

Page 2 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •