Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Problem: "Custom Soldiers in Custom Vehicles"

  1. #1

    Question Problem: "Custom Soldiers in Custom Vehicles"

    Dear OFP/ARMA: CWA veterans,

    Please share your ideas about this problem.
    I created custom Soldiers witch use their own Config.cpp (class CfgMovesMC) and are unable to be used inside custom vehicles
    that also have their own class CfgMovesMc.

    Examples:
    1) My custom Soldiers in FGP Jeep


    2) NorFor mod Soldiers in FGP Jeep


    As you can see soldiers that use their own class CfgMovesMC fail to get animation files from custom Vehicle folder.
    The worst part is that also happens for Resistance vehicles, such as Motorcycle.

    I guess this problem appears because Class CfgMovesMC is a "local" class that has "limited visibility" to other classes (such as Custom Soldiers),
    I apologize for my primitive understanding. I am no programer.

    Please share your ideas about solving this problem. Any suggestions are appreciated


    Thank you in advance, Icarus

  2. #2
    Gunnery Sergeant krzychuzokecia's Avatar
    Join Date
    Sep 28 2009
    Location
    Warszawa - capital of Poland
    Posts
    461
    I don't know if this will help you, but I think this problem is related to car only, not units - I'm having the same problem with vanilla units & P:UKF Land Rovers WMIK.

  3. #3
    Can you elaborate on what you mean by "use their own cfgmovesmc"?

    Do you mean you copy/pasted the entirety of cfgMovesMC and made it a new class, i.e:

    class IcarusMovesMC { .... copy of cfgMovesMC ... };

    or do you mean you are following the pattern of the BIS women, i.e:

    class IcarusMoves: CfgMovesMC { class StatesExt { ... }; } ?

  4. #4
    Staff Sergeant Icarus's Avatar
    Join Date
    Apr 14 2011
    Location
    Behind you
    Posts
    264
    Author of the Thread
    Thank you guys for responding

    Quote Originally Posted by DanAK47 View Post
    Can you elaborate on what you mean by "use their own cfgmovesmc"?

    Do you mean you copy/pasted the entirety of cfgMovesMC and made it a new class, i.e:

    class IcarusMovesMC { .... copy of cfgMovesMC ... };

    or do you mean you are following the pattern of the BIS women, i.e:

    class IcarusMoves: CfgMovesMC { class StatesExt { ... }; } ?
    That is exactly what I did My cutom soldier has its own config.cpp and cutom CfgMovesMC section witch is a modified copy
    of ww4mod2.5 CfgMovesMC:
    Spoiler:

    I am Sorry I can not show all the CfgMovesMC_IS because text is too long

    I can send you my config file if you want to take a look at it.

    Thank you for help, Icarus
    Last edited by Icarus; Jul 16 2012 at 16:22.

  5. #5
    So, that's very easy. Just post the config.cpp of the custom jeep here and i'll help you.

    But the logic is : in the config.cpp of the jeep, you must have a "cfgmoves" section, which defines some "class stand" actions, one for the driver, and the other for the gunner (and maybe some for the cargo or co-driver). Those actions are then used in the "cfgvehicleactions" (which must be in the same jeep config) then used in the "cfgvehicle" of the jeep through driveraction = "manactblablabla" and gunneraction = "manactblablabla".

    All you have to do is copy and paste the two actions defined in the cfgmoves section of the jeep config in your own CfgMovesMC_IS, at the end of if (in the "class stand" part).

  6. #6
    The problem with that method is that you have to add all the animations used by custom vehicles into your CfgMovesMC, and if someone releases another vehicle that uses custom animations - your soldiers will be broken again.

    It is much better to use the method I explained to you in PMs a while ago:

    Add your custom animation states into the EXISTING cfgMovesMC with prefixes - IE IcarusCombat, IcarusCrouch, etc.

    Then, create a new CfgMovesMC in the model of the BIS women - using StatesExt. Next, force some default states (Combat, Stand, etc) to connectTo your new states.

    As an outline (obviously some necessary code is missing here, but you should be able to fill in the gaps):

    Class MySoldier
    {
    moves=MyMoves
    };

    Class CfgMovesMC
    {
    class Actions { MyCombatActions... {}; };
    class States { MyCombat {}; };
    };

    Class MyMoves: CfgMovesMC
    {
    class StatesExt
    {
    class Combat: Default
    { .... copy/paste stuff from your "Combat" state here...
    ConnectTo[]={MyCombat,1};
    };
    };
    };

    The engine looks at your soldier, sees it uses MyMoves, goes to myMoves and plays the "Combat" state, which immediately connects to "MyCombat" back in the original CfgMovesMC. As your states are now "inside" of the original CfgMovesMC, any states added to CfgMovesMC by other addons will already be "reachable".

    For a more in depth example (and more complex) look at the config for my guerrilla pack (it is uncompressed already - easy to unpbo and look at).

  7. #7
    Staff Sergeant Icarus's Avatar
    Join Date
    Apr 14 2011
    Location
    Behind you
    Posts
    264
    Author of the Thread
    Thank you for help ProfTournesol,

    Unfortunatelly my class CfgMovesMc_IS is over 200000 characters long (max allowed message on forum is 50000 characters)

    I will try to send you PM

    Icarus

  8. #8
    Quote Originally Posted by Icarus View Post
    Thank you for help ProfTournesol,

    Unfortunatelly my class CfgMovesMc_IS is over 200000 characters long (max allowed message on forum is 50000 characters)

    I will try to send you PM

    Icarus
    Im sure a CfgMovesMc_IS shouldnt be that long?

    Interested in playing PvP in Arma3? Check out FUSION
    AMAR: Addon Makers for Author's Rights
    Nogovan Armed Forces Mod - OFP/A1/A2/A3 - Website

  9. #9
    Staff Sergeant Icarus's Avatar
    Join Date
    Apr 14 2011
    Location
    Behind you
    Posts
    264
    Author of the Thread
    Maybe I have done something wrong...

    I guess I need Beta testers
    If there are volunteers, please send me PM.

    Icarus

    P.S. @DanAk47: No new moves where created I just replaced some hangun animations with aimed animations to get 3D Ironsight effect.
    Last edited by Icarus; Apr 10 2012 at 10:57.

  10. #10
    In that case, you do not need a new cfgMovesMC at all.. Just place your replacement HandgunStand, HandgunCrouch, etc animations in StatesExt.

Page 1 of 2 12 LastLast

Similar Threads

  1. custom "THROW" problem
    By SilverRanger in forum OFP : CONFIGS & SCRIPTING
    Replies: 5
    Last Post: Feb 28 2011, 17:04
  2. "Custom Face" Option Missing from Edit Player Menu
    By triplea007 in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 4
    Last Post: Jul 3 2009, 11:59
  3. "Jumpy" Mouse & Multiplayer Custom Difficulty
    By Scrivener in forum ARMA - TROUBLESHOOTING
    Replies: 1
    Last Post: Mar 16 2008, 11:44
  4. Inheriting from BIS "put" and using custom "pu
    By Terox in forum ARMA - ADDONS & MODS: DISCUSSION
    Replies: 0
    Last Post: Nov 13 2007, 17:51
  5. custom callsign instead of "Alpha", "Bravo", etc.
    By krajceck in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Jan 25 2007, 03:43

Posting Permissions

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