Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Combat Framework

Discussion in 'Assets and Asset Store' started by username_unity_of_my, Aug 29, 2016.

  1. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Not yet, sorry.
    Next, mobile controls and more flexible inputs is on the schedule. ( will be out very soon ).
    Then I'll do teams and see to upgrade Photon to PUN2.
     
  2. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Ok great! Looking forward to all three! Couple quick questions....

    1) Do you know of a quick way to copy animation events from one animation to another? The only scripts I could find that does this in the editor is outdated.

    2) Do npc animations require animation events or can animations just be swapped?


    3) Finally - I get a notice for the 2018 DLT when is this version due out? Thanks
     
  3. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    New Thread - Does anybody know how to make an item that would summon NPCS to fight for your player character? You know like having a pack of wild dogs fight for you. I can get the freindly NPCS created but I dont know how to make them not attack the player - and other NPCs
     
  4. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    1) hmm, without writing scipt for it, no, I dont

    2) npc animations that do what? attack? If you mean attack - then yes, they need events
    Many of animations in system require events.

    3) I dont understand the question :/
     
  5. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    1) ok just wondered if you knew of a script to copy animation events.
    2)ok
    3)This notice
    Some features of Combat Framework not supporting current unity version ( 2018.4.1f1 ) . Please wait for next update.
     
  6. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Ah, yes. Dont worry about it. That just shows on unity version 2018.4 and after next update it will be fixed
     
  7. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    My motorcycle teacher said that exact same thing to me today weird hu? But dont worry about it.
     
  8. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    If you are in the hurry, send me email and I'll send you fix.
     
  9. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    thanks I just down graded and it seemed to help...

    what I really need help with is this: New Thread - Does anybody know how to make an item that would summon NPCS to fight for your player character? You know like having a pack of wild dogs fight for you. I can get the freindly NPCS created but I dont know how to make them not attack the player - and attack the other NPCs sort of like teams but the npcs are attached to each single player
     
  10. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    Use Emerald AI asset [ https://assetstore.unity.com/packages/tools/ai/emerald-ai-2-0-40199 ], it has good companion behaviors, you will have to integrate health/damage with Combat Framework's code.
     
  11. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    You don't have to downgrade, you can upgrade to 2019.1. Only 2018.4 has this message ( until next update)

    To make npc attack npc, you have to disable player target searching in NPCManager or whenever you set target to npc - NPCManager will override it.
    After you disable NPCManager target seaching ( is searching for player ), you can manualy set any target you want to npc.
    Until I make teams.
     
    Last edited: Jun 16, 2019
  12. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
  13. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Thanks Mario... so if logic serves..we make a script that disables player target searching and enables searching for nonFREINDLY or checks a variable on an acquired object scan and then targets that

    How is current player spotting/ target aquisition occur now? Can your existing script for target acquisition be modded or do you recommend making something separate?
     
  14. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    You have to modify NPCManager script ( find targets method )
     
  15. saltysquid

    saltysquid

    Joined:
    May 1, 2017
    Posts:
    33
    Brand new user (to CF) here so bare with me. Are there any tips on getting this to work with UMA characters? I took off all components of my UMA besides the transform, animator, and dynamic character avatar... but the code breaks here:

    if (!anim.avatar) { Debug.LogError("Avatar missing"); return null; }

    I don't have an avatar with an UMA (as far as I'm aware). I have a character builder section in my game and load saved characters dynamically so the model is added at runtime. I searched the forum and found one user who seemed to have it working so I'm interested in what the steps are.
     
  16. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    I can tell you pointers since I havent worked with UMA.
    You have to run player creation script when UMA is finished generating character.
    Also you have to make player creator be able to create player on runtime by removing all references to UnityEditor.dll.
    That's about it
     
  17. Matheesanahila

    Matheesanahila

    Joined:
    Nov 2, 2017
    Posts:
    5
    can i make a mobile app with this?
     
  18. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Mobile controls will be released in next update
     
  19. saltysquid

    saltysquid

    Joined:
    May 1, 2017
    Posts:
    33
    I'll give that a shot, thanks.
     
  20. Matheesanahila

    Matheesanahila

    Joined:
    Nov 2, 2017
    Posts:
    5
    thanks can you tell me how long it's going for mobile controls?
     
  21. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    I'll submit today or tomorrow and then it depends how long it takes for submission process ( few days usually )
     
  22. Matheesanahila

    Matheesanahila

    Joined:
    Nov 2, 2017
    Posts:
    5
    it's good to hear that, i am waiting for that
     
  23. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    When do you think it will be updated to PUN 2 ?
     
  24. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    I'll take a look at it,I don't know how long will it take, though. It depends on how different PUN2 is from PUN Classic.
     
  25. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    Thank you
     
  26. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    26
    I got it working with UMA (and still using it with UMA). IIRC just make sure you use the Bone Builder on your UMA. That creates the bone structure on the game object (instead of at runtime) which allows the combatframework scripts to work correctly.
     
  27. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Version 4.4 is out.
    One of the updates are with mobile controls.
    For list of all updates check LINK

    In the next few days I'll create video tutorial on how to set up mobile game.
     
  28. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    I'm getting the following errors when running a Third Person Controller with photon:

    1.) NullReferenceException: Object reference not set to an instance of an object
    MLSpace.ItemPicker.fixedUpdate (MLSpace.Inputs inputs) (at Assets/_CombatFramework/_System/scripts/Items/ItemPicker.cs:100)

    2.) MLSpace.PlayerControl.fixedUpdate (MLSpace.Inputs inputs) (at Assets/_CombatFramework/_System/scripts/Character/PlayerControl.cs:127)

    3.) MLSpace.PlayerControlPhoton.fixedUpdate (MLSpace.Inputs inputs) (at Assets/_CombatFramework/_System/photon/scripts/character/PlayerControlPhoton.cs:1614)

    4.) MLSpace.StandaloneInputs.FixedUpdate () (at Assets/_CombatFramework/_System/scripts/Input/StandaloneInputs.cs:39)
     
  29. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308

    Oh man, what happens when in haste.

    Here's the fix:
    Add instruction that is in bold in ItemPicker.fixedUpdate
    if(SceneTransitionManager.instance && SceneTransitionManager .instance.isLoading )
    {
    return;
    }

    There is no transition manager in multiplayer because there are no transitions.

    I'll release update.
     
    Last edited: Jun 27, 2019
  30. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    If that's the only problem after reworking things you're doing great :)
     
  31. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    Is there a way to make the NPC's run to the player to attack?
     
  32. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Sure, you can set chase move speed in any of npc scirpts.
    Field 'Chase Move Speed'.
     
  33. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    I increased that but it still walked... I didn't see in the animation controller anything about running, let me take a look again, it's probably me overlooking something.

    Update comment: OK, I got it to work but I increased the 'Move Speed' in the NPC's 'Stats'... when increasing the 'Chase Speed' it didn't increase it's speed when it detected me.
     
    Last edited: Jun 28, 2019
  34. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    46
    I know you're working on the Teams & PUN 2 upgrade but when you're adding the Teams to the Lobby can you also add the array for choosing different 'Player' characters to it?

    Is that possible?
     
    Last edited: Jul 11, 2019
  35. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    I released 4.5 update
    -new------------------------------------
    - added example of mobile+multplayer
    - bugfixes -----------------------------
    - ground checks on scene transitions
    - scene requirements creations
    - fixed chasing speed not working on Photon npcs
    - fixed bow shooting in on click mode ( sometimes would get stuck )
    - improvements -------------------------
    - photon lobby ( better scaling and added scroll rect )
    - added option to choose aiming algorythm
    In PlayerControl.cs or PlayerControlTopDown enable/disable macro LOOK_AT_METHOD_2 to use first or second aiming method - what suits you better
    -
     
    SLThompson and NightcoreLV like this.
  36. pparkdea

    pparkdea

    Joined:
    Dec 23, 2018
    Posts:
    6
    Hi!, Will the clothing and armor equipment systems be updated? :)
     
  37. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Oh, there are some things i have to update before that.
    I'll see about that when time comes.
     
  38. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Hi - Does anybody know what would make the NPCs not attack anymore? After an update of the scripts -They take damage and animate and die normally but stopped chasing after and attacking the player...
     
  39. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Additional Different issue in the mobile top down demo when the auto rifle is taken from the 2nd chest my player animates but wont move and cant equip any other weapon - when unequipping the rifle stays stuck in the rilfe pose...
     
  40. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Can you tell me how to replicate the problems ?
    Can you send me email on mariolelascontact@gmail.com so we continue there
     
  41. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Sure I emailed you - I got the NPCS to work again - It was my bad I had an extra NPCS manager script in the scene - but the guns still dont work when I swap a model for the standard player
     
  42. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    How do you swap model ?
    If you want to create player, you have to use player creator. You cannot just swap models.
    There are some setups to do on bones ( like creating ragdoll components & adding spine aim script etc.. ) which are done on player creation.
     
  43. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    131
    Mobile controls are not only for topdown mode, correct? I read in your instructions saying choosing topdown player shen adding mobile controls, something like that.
     
  44. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    They are for now. I'll add third person in one of next updates.
     
  45. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Ive gotten the new model set up and adjusted using the new tools menu - which is helpful - but even with the spine aim script Im getting a bug where the model doubles over if aiming too far.. Its like theres no IK contraint - but I dont know how to fix this. doubledover.jpg
     
  46. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308

    You have to set spine up vector for new model.
    You can use 'Adjust Weapon Window' ( when opened, choose 'adjust up vector' from drop down list )
    Or you can set up vector directly in LookAtAdvanced component on spine bone.
     
  47. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    173
    Can you be more specific as to how those functions address this. I have been using both of those functions. And when aiming forward the model can be adjusted to look correct - however when moving the cross-hairs around the scene the above happens. - also the LookatAdvanced appears on the "chest" of the spine in your default- You usually make a video to address these sorts of issues - but I cant find one to rig new player models with IK and shooting weapons
     
    Last edited: Sep 4, 2019
  48. pparkdea

    pparkdea

    Joined:
    Dec 23, 2018
    Posts:
    6
    how to make a health potion, stamina potion?
    Can you explain?
     
  49. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    Here is the video on how to set up aiming ( up vector ):
     
    BryanO likes this.
  50. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    308
    It depends on how you want to make them.
    If you want to make triggers ( like, when player walks over then or pick them up ), you can override Trigger class.
    Look into pickup triggers - there is already health pickup in project.
    If you want to make potion set into inventory, override InventoryItem class. Set it of 'Consumable' type.
    Add some function 'use'. Currently, all items are weapons in project.
     
unityunity