Search Unity

[RELEASED] Coop Action Game Kit - With Procedural Level Generation & up to 4p Local Coop

Discussion in 'Assets and Asset Store' started by DanielSnd, Jul 29, 2014.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi -

    Dig into the scripts PickupWeapon.cs and PlayerWeaponManager.cs.

    PickupWeapon calls this method to equip the weapon:
    Code (csharp):
    1. pC.weaponManager.EquipWeapon(myWeapon,false);
    If you're using an inventory system and want to equip a weapon manually, replace this method in PickupWeapon with code that moves the weapon into the player's inventory. When the player equips it from the inventory, call pC.weaponManager.EquipWeapon(myWeapon,false).
     
  2. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    thank you very much.

    I will try and investigate with what you have told me, Let me see if I can solve this problem.
     
  3. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    I can not make this work.

    I need the player to use neither the pickupweapons nor the PlayerWeaponsManeger

    Any suggestions?

    I need that if the weapon is active can use it, if it is deactivated it stops using that weapon.

    I have this code for inventory.

    public bool ActivadaArma;
    public void ArmaOHerramienta()
    {
    for (int i = 0; i < ArmasUsables.Length; i++)
    {
    if(InvRap.objetosCofre[numSlot].iD == ArmasUsables.iD && !ActivadaArma)
    {
    ArmasUsables.Objeto.gameObject.SetActive (true);
    ActivadaArma = true;

    }
    else
    {
    if(InvRap.objetosCofre[numSlot].iD != ArmasUsables.iD){
    ArmasUsables.Objeto.gameObject.SetActive (false);
    ActivadaArma = false;
    }
    }
    }
    }


    tells me that Attack is not in the InventoryManager script when I try that in the PickupWeapon use the weapon that active from the inventory.

    public override void PickupEffect(PlayerController pC) {
    //pC.weaponManager.EquipWeapon(myWeapon,false);
    pC.IM.ArmaOHerramienta();
    //RemovePickupStuff();
    }


    in "PlayerInput.cs" gives me an error in "Attack"
    pC.IM.ArmaOHerramienta.Attack(attackDirection);

    can you help me please, I have the project blocked because I can not make progress for this.

    I just need to use lar guns without the pickerweapons and playerweaponsmanager


    thx!
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
  5. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    ok, I'll try to contact him, thank you.
     
  6. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    @DanielSnd Could i request a character selection screen? or could i hire you to implement it?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    It isn't a complete solution to what you're asking, but this post explains how to instantiate a different character prefab. You'd still have to make a screen to allow the player(s) to select which prefab to instantiate.
     
  8. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    Hey @TonyLi could you help me with picking up weapons by pressing a key instead of running over them? thanks
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Sorry, it's been a couple years since I've worked with this kit. Daniel may just be out of the office, and hopefully he can help when he gets back.
     
  10. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    I'm trying to make it work on the phone, I have CNControls installed, but I get the following error

    Assets/COOP Action Game Kit/_Scripts/Player/PlayerInputMobile.cs(6,10): error CS0246: The type or namespace name `CNJoystick' could not be found. Are you missing an assembly reference?

    Can somebody help me?
    thx!
     
  11. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    @DanielSnd are you still supporting this? i really need some help with stuff
     
  12. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    I wrote to him a month or two ago and no answer, here either. a shame, great product!
     
  13. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
  14. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    I was about to buy in the sales of last week, it seems a good product.
     
  15. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    I want to create a coop medieval Action game, this Looks like a very good start for small Money :)

    Does it work with Unity 2018, too?

    I would like to use UMA, can I use the Animation Controller from the sample with other human meshes, means UMA in my case?

    https://www.assetstore.unity3d.com/en/?stay#!/content/35611

    Maybe later replace single current animations with own ones if I have better ones?

    Thanks a lot!

    PS: Windows and Webplayer Links are down. Too bad this seems to be depricated...
     
    Last edited: Jun 21, 2018