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

cs port

Discussion in 'Made With Unity' started by friuns3, Sep 9, 2011.

  1. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  2. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    586
    It would be nice if you could post more details and some screenshots. Otherwise not many people would be willing to bother downloading a 75mb unitypackage :)

    By the way, it looks like you've (or someone) extracted that counter terrorist model straight out of CS. I know you're not planning to use it in commercial products in the future, but you are still distributing that model freely (most likely) without valve's permission. Just keep this in mind. I also see a couple of mixamo models in there. Not sure if these are free, but if you've bought them, I recommend you not putting these into unitypackages you're distributing for free

    Also, looks like that unitypackage just imports an entire project. Next time you should just zip your entire project and uploaded the zip. Easier than having to create a new project and then have unity extract the data from the unitypackage and import them! :)

    Apart from that, I like the look of the toon shader on that model, gives it a bit of a unique look

    A couple of quick pointers:

    Have a look at the First Person Controller prefab within your Standard Assets > Character Controllers > First Person Controller. This will help you get an FPS walker working properly (With mouse look).

    Instead of using one big capsule collider, you can use compound colliders. Have a sphere collider for the head, and maybe some box colliders for the body, arms and legs

    Put the "ak47" object onto a new render layer. This way you can use the camera's culling mask to render everything other than the floating ak47+arm model floating about
     
    Last edited: Sep 10, 2011
  3. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    thanks for tutorial=)

    they shouldnt be there, don't know how they get there=)

    http://dl.dropbox.com/u/8543448/csport2.unitypackage
    +added crosshair
    +added jump animation
    +added animation to hands
    +improved walk skript
    +removed unused content.

    p.s. i put next releases in zip
     
    Last edited: Sep 10, 2011
  4. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  5. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  6. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  7. ivanzu

    ivanzu

    Joined:
    Nov 25, 2010
    Posts:
    2,065
    This is actually pretty good lots of thing can be learned from the cs files.
     
  8. FenixSRB

    FenixSRB

    Joined:
    Aug 23, 2011
    Posts:
    36
    Keep update man :D
     
  9. ivanzu

    ivanzu

    Joined:
    Nov 25, 2010
    Posts:
    2,065
    Its password protected whats the point of sharing something without giving a password.
     
  10. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    again, password igorlev.tk =)
     
  11. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  12. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  13. Earthquake

    Earthquake

    Joined:
    Nov 2, 2010
    Posts:
    261
  14. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  15. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    Last edited: Sep 19, 2011
  16. erenaydin

    erenaydin

    Joined:
    Mar 1, 2011
    Posts:
    366
    awesome
     
  17. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    thanks =)
     
  18. matis1989

    matis1989

    Joined:
    Mar 23, 2011
    Posts:
    162
    very very good work. keep update:)
     
  19. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  20. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    Last edited: Sep 23, 2011
  21. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  22. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Pretty cool. CS is my favorite game of all time, you are doing a good job replicating it.
     
  23. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    Great! : D

    Unity in the compilation gives me some errors. Maybe because I use the free version?

    (I apologize for my English)
     
  24. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    should work on unity free, what errors? can you give me log? I apologize for my English too=)
     
  25. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    Assets/Scripts/Main/Player.cs(377,42): error CS1061: Type `Node' does not contain a definition for `GetPos' and no extension method `GetPos' of type `Node' could be found (are you missing a using directive or an assembly reference?)

    Assets/Scripts/Main/Player.cs(377,25): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Distance(UnityEngine.Vector3, UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(377,25): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(399,59): error CS1061: Type `Node' does not contain a definition for `GetPos' and no extension method `GetPos' of type `Node' could be found (are you missing a using directive or an assembly reference?)

    Assets/Scripts/Main/Player.cs(399,45): error CS1502: The best overloaded method match for `Bs.ZeroY(UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(399,45): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(399,32): error CS1502: The best overloaded method match for `UnityEngine.Quaternion.LookRotation(UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(399,32): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(406,37): error CS1061: Type `Node' does not contain a definition for `GetPos' and no extension method `GetPos' of type `Node' could be found (are you missing a using directive or an assembly reference?)

    Assets/Scripts/Main/Player.cs(406,23): error CS1502: The best overloaded method match for `Bs.ZeroY(UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(406,23): error CS1502: The best overloaded method match for `Bs.ZeroY(UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(407,50): error CS1502: The best overloaded method match for `UnityEngine.Ray.Ray(UnityEngine.Vector3, UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(407,50): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(407,25): error CS1502: The best overloaded method match for `UnityEngine.Physics.Raycast(UnityEngine.Vector3, UnityEngine.Vector3, float)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(407,25): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(408,34): error CS0019: Operator `*' cannot be applied to operands of type `UnityEngine.Quaternion' and `object'

    Assets/Scripts/Main/Player.cs(409,41): error CS1061: Type `Node' does not contain a definition for `GetPos' and no extension method `GetPos' of type `Node' could be found (are you missing a using directive or an assembly reference?)

    Assets/Scripts/Main/Player.cs(409,19): error CS1502: The best overloaded method match for `UnityEngine.Debug.DrawLine(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Color)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(409,19): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'

    Assets/Scripts/Main/Player.cs(410,37): error CS0019: Operator `*' cannot be applied to operands of type `UnityEngine.Quaternion' and `object'

    Assets/Scripts/Main/Player.cs(410,20): error CS1502: The best overloaded method match for `Bs.ZeroY(UnityEngine.Vector3)' has some invalid arguments

    Assets/Scripts/Main/Player.cs(410,20): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'

    Error building Player because scripts had compiler errors
    UnityEditor.HostView:OnGUI()

    Exception: Error building Player because scripts had compiler errors
    UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:367)
    UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:972)
    UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:953)
    UnityEditor.BuildPlayerWindow.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:726)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:225)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:218)
    UnityEditor.HostView.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:119)

    Then I found other problems, such as:


    Failed to connect to master server at 127.0.0.1:23466 //Not if it's a bug or not.

    Then the lights are effective only on: nodes.
     
  26. erenaydin

    erenaydin

    Joined:
    Mar 1, 2011
    Posts:
    366
    What the hell!, This is really awesome (Bots are excellent :D)
     
  27. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    in Loader.cs comment lines MasterServer.ipAddress = "127.0.0.1"; MasterServer.port = 23466;

    there is fixed Node.cs


    using System.Linq;
    #if UNITY_EDITOR
    using UnityEditor;

    #endif
    using System.Collections;
    using UnityEngine;
    using System;
    using System.Collections.Generic;
    using gui = UnityEngine.GUILayout;

    public class Node : Bs
    {
    public bool StartNode;
    public float height;
    internal int walkCount;
    public List<Node> nodes = new List<Node>();
    public IEnumerable<Node> Nodes { get { return nodes.Where(a => a != null); } }
    public override void Awake()
    {
    if (!isEditor)
    Active(false);
    }

    public Vector3 GetPos(float offset)
    {
    return pos + rot * Vector3.left * offset;
    }


    #if UNITY_EDITOR
    private static Node[] GetNodes()
    {
    Node[] nds = Selection.gameObjects.Select(a => a.GetComponent<Node>()).Where(b => b != null).ToArray();
    return nds;
    }
    public override void OnEditorGui()
    {
    if (gui.Button("Link Nodes"))
    {
    Undo.RegisterSceneUndo("rtools");
    Node[] nds = GetNodes();
    foreach (Node a in nds)
    foreach (var node in nds)
    if (a != node !a.nodes.Contains(node))
    a.nodes.Add(node);
    }
    if (gui.Button("UnLink Nodes"))
    {
    Undo.RegisterSceneUndo("rtools");
    Node[] nds = GetNodes();
    foreach (Node a in nds)
    foreach (var node in nds)
    a.nodes.Remove(node);
    }
    }


    #endif
     
    Last edited: Sep 24, 2011
  28. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    Last edited: Sep 26, 2011
  29. bgivenb

    bgivenb

    Joined:
    Sep 15, 2010
    Posts:
    449
    Dropbox link not working.
     
  30. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    now its uploaded, now should work
     
    Last edited: Sep 26, 2011
  31. rockysam888

    rockysam888

    Joined:
    Jul 28, 2009
    Posts:
    650
    (bookmarked)
     
  32. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    update 14

    added survival mode
    added follow me logic to bots.

    updated monsters for survival mode
    -cant see backwards
    -when hit->attack enemy
    -move slower if don't see enemy

    added sounds
     
  33. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    Great job!
     
  34. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  35. marf

    marf

    Joined:
    Jul 20, 2011
    Posts:
    123
    Awesome project, very very good! ;)
     
  36. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
  37. marf

    marf

    Joined:
    Jul 20, 2011
    Posts:
    123
    What do you use for models? And why they appear like cartoon? Can I remove the effect?
     
  38. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    yes just switch shader to diffuse =)
     
  39. marf

    marf

    Joined:
    Jul 20, 2011
    Posts:
    123
    Thanks a lot ;)
     
  40. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
  41. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    i have same problem, i think its unity editor bug
    this error apears when i save scene ctrl+s
     
  42. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    I noticed that the player goes with half-length under the map, is this normal?

    Thanks again.
     
  43. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    half-length under the map? when? Give me screenshot
     
  44. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    Happens in all maps.

     
  45. marf

    marf

    Joined:
    Jul 20, 2011
    Posts:
    123
    Me too, with the third person view there's this problem.
     
  46. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    Even with bots or other players.
     
  47. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    you mean always? or at what moment?
     
  48. thed0ct0r

    thed0ct0r

    Joined:
    Sep 11, 2011
    Posts:
    23
    It always happens.
     
  49. coin-god

    coin-god

    Joined:
    Jan 21, 2010
    Posts:
    325
    Yes, in "1" map they work but look like that, big and rotated.

    In the other maps the same happens, but they don't even move or shoot.
     
  50. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    293
    perhaps its becouse i zip project, i will create unitypackage tommorow, now i go sleep)
     
unityunity