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. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Hey Daniel, do you mind if i send my project over to you? I'm having a very hard time trying to get my animations to work... I tried to duplicate your settings in the inspector, but it still didn't work:(! What i did was i created a project, added your scripts, added my model, and tried to recreate your animation controller (without the torso part). and it seems to work a little bit.. except for the fact that my melee animations freak out, and the blend tree isn't smooth when changing animations. All help is appreciated.
     
  2. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Sure, send it over and I will take a look when I have some time :)
     
  3. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Hey Daniel, I fixed my own problem! I found out that the problem is in the characterMove script, where you set the animator floats. instead of:
    Code (CSharp):
    1. anim.SetFloat("VelX", leftStickInputAxis.x);
    2. anim.SetFloat("VelZ", leftStickInputAxis.y);
    I changed it to:
    Code (CSharp):
    1. anim.SetFloat("VelX", leftStickInputAxis.x, directionDampTime, Time.deltaTime);
    2. anim.SetFloat("VelZ", leftStickInputAxis.y, directionDampTime, Time.deltaTime);
    directionDampTime being a float that states how long it will take to move from one animation to another. Before it was defaulting to 0, causing the animations to "snap". But if you use the method stated above and set directionDampTime to 0.25f, it will take 25% of 1 second to move from animations. This made my day :D
     
  4. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Oh! Awesome! :D Thanks for sharing!
     
    Brendonm17 likes this.
  5. scorpionfeast

    scorpionfeast

    Joined:
    Dec 5, 2014
    Posts:
    18
    Hi,
    I bought this asset from assetstore. But Unfortunately, I am not able download it, Can you share it via dropbox or something? my email address is scorpionfeast@gmail.com.

    Attached is payment reciept. Screen Shot 2014-11-26 at 1.16.30 am.png Screen Shot 2014-11-26 at 1.16.30 am.png
     
  6. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    Hey Im REALLY trying to make a partner ai that attacks enemies. I couldn't find a way to do it through the inspector interface. I tried looking at ur enemy ai and attack code, and I couldn't figure out what makes something hit an enemy. Is there a simple way to make a partner ai?
     
  7. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    The kit is awesome i gave u 5 stars, i am experiencing one Bug though and it is Outstanding, Multiplayer players are unable to pick up weapons that are dropped by one another and some weapons refuse to be picked up at all by first player while other refuse to be picked up by second player, i am experiencing this on a completely fresh project i can provide a detailed analysis of the bug if u care to email me at Skylem@live.com.au and have been assessing how pickups are handled to see if i cant find the actual code, it seems like a collision issue though i can't work out exactly why, i know it is affected by whichever player picks up the first weapon.
     
  8. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hi Daniel, do you think we can expect an update by the end of the year?
     
  9. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    @ Arrea i looked into this also, u would need to create a new ai script to perform similarly to the EnemyAI with the difference being instead of iterating through a list of players u would iterate ur list of potential enemies, to start with i would suggest creating duplicates of EnemyAI and EnemyAtk then change/create detection settings to determine An enemy instead of a Player.
     
  10. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    That's a good suggestion. Not sure if there would be a simpler way :( AI is complicated.

    I can't promise anything, there are a fill small bugs I want to fix, but I think I'll have to stay away from anything major.


    Thanks, I haven't really tested dropping and picking weapons with different players D: I guess I might have missed something there, will look into it. Sent you an email
     
  11. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    Believe it or not, I tried looking into that. I am actually using the RAIN AI asset to create the partner ai. I wanted just to see what made the enemy flinch or get hit, and I couldn't find the exact set of lines that caused that. I thought of a really sloppy solution that involved spawning the projectile prefabs to hit the enemy (making the spawned prefabs invisible) when my AI attacked. I can already make a decent AI with the rain asset. Interacting with the slug enemies is the problem.
     
  12. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Look into attackMethods.cs
    You just need to use the DealDamage method.
    Find the slug your AI is attacking and call a DealDamage on your AI's transform, so... transform.DealDamage(Slug'sTransform,Damage,Knockback force, knockback duration, AI transform);
     
  13. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    Ah OK that helps a bit, Ill try it shortly. Now should I call DealDamage on a condition like if my attack collides with the object or what?
     
  14. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    u might be able to create a string for use when the Player List is being created(if tags are used), could set a bool
    for isAlly, if isAlly change string from "Player" to "Enemy" along with detection Mask, just a suggestion, hope it helps, i still haven't looked into AI targeting methods however so i haven't tried this myself yet.
     
  15. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Pretty much :D If it collides with the object with an enemy tag or something like that, then call dealdamage to apply damage to it.
     
  16. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    I am also having a problem with getting the physics to work on my personal AI (It was working great before i re-imported the cheating area scene. I cannot get it to work now for some odd reason. I gave my AI the character move script and a character controller and it's not working like the last time. Any ideas?
     
  17. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Is the AI calling the right function to move? not sure what could be happening without knowing more about the AI D:
     
  18. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    Arrea i noticed in an earlier reply u said u were using rain, I have experimented with both Rain 1 and 2 and experienced countless issues with the ai i was creating, for example they would randomly stop responding or working at all, perhaps this has something to do with ur current issue.
     
  19. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Oh do you find RAIN is not a good AI solution? I've just started playing around with it myself and it seems pretty cool so far.
     
  20. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    I even removed the AI component to find out it wasn't working right. It should work with just the character move script and the character controller right?
     
  21. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    My AI relies heavily on RAIN. The AI in this toolkit is a bit difficult to use other than enemy ai. The scripts seem a bit too codependent and I dont have too much flexibility. For instance I am trying to work on getting a partner AI working. I used rain to get most of my partner functionality. I just need my AI to be able to hit the game kit's AI at the moment, and I was having trouble finding out how to get that functionality
     
    Last edited: Dec 11, 2014
  22. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    Ah ok well if u have him corrently using an attack u could create a function when it enters collision of an enemy mask or tag to call the damage in character health i used something similar heres an example
    Code (CSharp):
    1.     void OnCollisionEnter(Collision other) {
    2.        
    3.     if(other.gameObject.tag == ("Enemy")) {
    4.  
    5.     other.GetComponent<characterHealth>().TakeDamage(1);
    6.         }
    7.     }
    if collision wont be helpful then perhaps a trigger or list of nearby enemies.
     
  23. skylem

    skylem

    Joined:
    Jul 17, 2013
    Posts:
    11
    @DanielSnd I started looking into the bug and just have one question What script is responsible for calling PickupEffect inside of PickupWeapon.cs
     
  24. Arrea

    Arrea

    Joined:
    May 22, 2014
    Posts:
    15
    Ah that may provide a quick fix. I got my gravity to work I had to do different code for my gravity
     
    Last edited: Dec 11, 2014
  25. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    It's on PickupObject.cs, on fixed update. I'm checking on a sphere around the object for playercontrollers, and store the player found on a variable. Maybe I have to change it to be able to account for more than one playercontroller around the object =x
     
  26. Optical-Illusions

    Optical-Illusions

    Joined:
    Dec 23, 2013
    Posts:
    32
    Hi,
    Ive been looking at this kit and it looks great! however in an update could you guys add an fps coop version, a zombie type with wave system because i have not been able to do so with the kit and would greatly appreciate help like such. Thanks.
     
  27. therobotcentaur

    therobotcentaur

    Joined:
    Jan 7, 2015
    Posts:
    2
    Hello. Just bought the kit and I'm having a hard time running it. Followed the readme instructions but I am unable to toggle/check the Scenes in my Build Settings. Could you help? Thanks. Sam.
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Check these steps:
    1. Select File > Build Settings to open the Build Settings window.
    2. In the Project view, navigate to Assets/COOP Action Game Kit/_Scenes.
    3. Drag these scene files from the Project view to the Build Settings window:
      • MainMenu
      • Adventure
      • CheatingArea
      • MakeALevel
      • TestScene
    Then open the MainMenu scene and try to play it. If you get errors about input buttons not being defined, quit Unity. In your OS, unzip ProjectSettings.zip into the top-level folder of your project, not into the Assets subfolder. This will replace some files in a folder named ProjectSettings, which is at the same directory level as Assets. Then repeat steps 1-3 above to add the scenes back into the build settings.

    If none of this helps, please post a screenshot of your Build Settings window.
     
    therobotcentaur likes this.
  29. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Maybe delete the ones currently on the build settings window by clicking one by one and pressing the Delete Key on the keyboard. Then click and drag the scenes again, like Tony Li suggested.

    Thanks Tony <3
     
    therobotcentaur likes this.
  30. therobotcentaur

    therobotcentaur

    Joined:
    Jan 7, 2015
    Posts:
    2
    That worked guys, Thanks!

    Great kit so far and great little community here with the quick response!
     
  31. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    Hey a few questions before I buy this as its a kit that really interests me.

    Is there a way to limit weapons to players?
    So for example weapon A can only be picked up by player 2?

    Is there a way to make sure each player has a different model each time, so player 2 is always the same model (this shouldn't be an issue but always nice to double check :p)

    Plus I keep hearing 4 player support and multi player being thrown around but the kit doesn't directly say that is has multi player could you confirm if it does or not? or if it is planned to have this?

    Thanks in advance
     
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    (I'm just sharing my experiences as another user, not a developer on this product. @DanielSnd may have more to add.)
    You can do this with a small customization to a single C# script.

    By default, all players use the same model with different, randomized tinting. With another customization, this time to the spawner script, you can use different models.

    It's local (non-networked) multiplayer. It makes a great couch game. I run it on a laptop hooked up to my TV, using four Xbox controllers.
     
  33. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    So there are no plans to introduce online MP? I feel games like this nowadays really do need some sort of MP support.
    Also could you point me in the direction of which scripts I should take a look at once I get it if you have any ideas?
    I would greatly appreciate this my programming skills are very limited.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    It is multiplayer, but it's local multiplayer, not online multiplayer. There's been a resurgence in local multiplayer recently, such as the highly-regarded Nidhogg and PC Gamer's 2014 Multiplayer Game of the Year, Towerfall Ascension. Here's an interesting article on the return of local multiplayer.

    When I get back to the office, I'll reply with some guidance (unless Daniel does it first).
     
  35. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    Cheers for the help on the scripting side of things, and I am sorry when I say multiplayer I normally mean online I guess I come from the older group of people who say "split screen" when I mean local co-op :p but it would be nice to have the option or at least some guidance in to how would could put something like photon in to the game ourselves I think it would make the package a lot more appealing to a lot of people, as not everyone can get 4 people around a big tv.
    If you look at the games you listed those are very retro 2d games, where as with this kit you could make a more graphically advanced 3d game and have people question why it was lacking that sort of support.
    I am very aware it's not easy to put in and would probably require remaking a few things I just wanted to know if it was being considered or if it was off the table completely for future updates.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Edit _Scripts/Misc/Singletons/GameManager.cs. Line 105 starts a method called ExecuteSpawnPlayers(). On line 120, it instantiates a prefab named "Player". Instantiate your own prefabs instead. For example, say you defined the names of your prefabs in an array called playerPrefabNames[]. Use this line:
    Code (csharp):
    1. GameObject myPlayer = (GameObject) Instantiate(Resources.Load(playerPrefabNames[i]), SpawnPosition, Quaternion.identity);
    In _Scripts/Pickups/PickupObject.cs, on line 84 in CheckForPlayer(), only run currentTarget=collider.transform; if it's the player that's allowed to pick up the weapon. To find out which player, refer to GameManager.playerInfo[]. Test if the collider is equal to any of the colliders owned by the players in playerInfo[0] to playerInfo[3].
     
  37. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Damn Tony, you make my life so easy! hahahahha
    JessieK: I would have loved to make this kit an online multiplayer thing, but it's far beyond what I'm capable of. Every time I start trying to learn networking code all I end up accomplishing is getting a headache.
     
  38. AndPoint

    AndPoint

    Joined:
    Jan 13, 2015
    Posts:
    6
    Need to support about Mobile input
    I import CNJoystick such as you said in document
    But I need some error.

    1. Assets/_Scripts/Player/PlayerInputMobile.cs(22,30): error CS1061: Type `CNJoystick' does not contain a definition for `JoystickMovedEvent' and no extension method `JoystickMovedEvent' of type `CNJoystick' could be found (are you missing a using directive or an assembly reference?)
    2. Assets/_Scripts/Player/PlayerInputMobile.cs(23,22): error CS0123: A method or delegate `PlayerInputMobile.StopMoving()' parameters do not match delegate `System.Action<CNAbstractController>(CNAbstractController)' parameters
    3. Assets/_Scripts/Player/PlayerInputMobile.cs(23,22): error CS0428: Cannot convert method group `StopMoving' to non-delegate type `System.Action<CNAbstractController>'. Consider using parentheses to invoke the method
    4. Assets/_Scripts/Player/PlayerInputMobile.cs(27,32): error CS1061: Type `CNJoystick' does not contain a definition for `JoystickMovedEvent' and no extension method `JoystickMovedEvent' of type `CNJoystick' could be found (are you missing a using directive or an assembly reference?)
    5. Assets/_Scripts/Player/PlayerInputMobile.cs(28,24): error CS0123: A method or delegate `PlayerInputMobile.StopAttacking()' parameters do not match delegate `System.Action<CNAbstractController>(CNAbstractController)' parameters
    6.Assets/_Scripts/Player/PlayerInputMobile.cs(28,24): error CS0428: Cannot convert method group `StopAttacking' to non-delegate type `System.Action<CNAbstractController>'. Consider using parentheses to invoke the method


    Can you help me fix this issue or you can send for me project work with mobile input (CN Joystick).
    Thanks
     
  39. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Hi there, the solution can be found on this post:
    http://forum.unity3d.com/threads/re...p-to-4p-local-coop.259629/page-2#post-1834277

    Let me know if you have trouble with it ^^
     
  40. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I noticed you omitted the bloom and color correction from Unity Pro in the package. Is there a way to download these separately in case we want them?
     
  41. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Those are the default unity pro Image Effects:
    http://docs.unity3d.com/Manual/comp-ImageEffects.html

    If you have unity pro you can get and use them by right clicking on the Project View, going to Import Packages -> Image Effects (Pro Only)
     
    Exeneva likes this.
  42. fishZombie

    fishZombie

    Joined:
    Apr 28, 2014
    Posts:
    8
    Hello, I'd like to use this on an iPad. I'm not sure if you would consider that Moblie, or gamePad. Either way, how does the connection work? Are you using WiFi, 4G, or BlueTooth? Could a path system be implemented for character movement? Like the Spark Plug Tools Path Drawing System. I'm looking to do a top-down, turnbased, path drawing game, that can play against other players on Bluetooth, with some AI opponents. Fixed maps.
     
  43. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    This wouldn't be a good fit for that, this package is for local multiplayer (same machine) and not networked. And not very optimized for mobile
     
  44. nguyentuan24

    nguyentuan24

    Joined:
    Mar 16, 2015
    Posts:
    1
    I just bought it. I try MobileExampleScene scene on Android phone but i don't see joystick like your apk demo. Can you add this features to it?
     
  45. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
  46. eewoks

    eewoks

    Joined:
    Mar 21, 2015
    Posts:
    7
    Does anyone now how i to implement boundaries for the Camera? i like to stop it at a certain X or Z, so i dont the stuff that spawns outside my level. (Like in Crimsonland)
    Anyway thanks for this great Asset, no problems so far (except that i cant set camera boundaries)
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    In CamManager.cs, you could check the camera position in the Follow() method. If it's outside the boundaries, put it back inside. There's also this code that might be helpful. It keeps all players onscreen. You can also just use the code in that link and put boundaries on the map (e.g., cliffs, walls, or invisible colliders) that the player can't move past. Since the camera follows the player, it'll stay in bounds, too.
     
    DanielSnd likes this.
  48. eewoks

    eewoks

    Joined:
    Mar 21, 2015
    Posts:
    7
    Thanks alot, i got it working using mathf.Clamp at the end of Follow() :)
     
  49. seansteezy

    seansteezy

    Joined:
    Nov 28, 2013
    Posts:
    122
    Hey Daniel, has this been updated for Unity 5? I have been updating assets like crazy and forget if this was one I did yet or not. Thanks!
     
  50. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I haven't tried it in unity 5 yet, definetly haven't updated it D: