Unity Community


Page 19 of 21 FirstFirst ... 91718192021 LastLast
Results 361 to 380 of 417

  1. Posts
    2

    Help Needed To: Mod Example 4 FPS - & - Create New Maps

    Quote Originally Posted by jay1025 View Post
    1) When trying to tweak the initial values in Machinegun.js (such as my script values of “var damage=10.0; var bulletsPerClip=50; var clips=20”), such values get lost and are overridden in runtime when inspecting “PlayerPrefab(Clone).CrateCamera.Weapon”. First of all, I can’t find where “PlayerPrefab(Clone).CrateCamera” adopts “Weapon” as a child. :( Also, where do the new overriding values come from (such as “damage=20.0; bulletsPerClip=30; clips=5”)?
    Quote Originally Posted by appels View Post
    Inspector values have precedence over the ones in the script. So you need to edit the ones you want in the inspector also or make the values private in the script.
    Thanks Appels for the advice about using 'private' in scripts to hide from the inspector.

    Also, I'm hoping if somebody could help me find -- in the original FPS -- 'where “PlayerPrefab(Clone).CrateCamera” adopts “Weapon” as a child.' Once someone can point me in that direction, I hope to understand how the original project overrides -- at runtime -- Machinegun.js vars such as: 'damage', 'bulletsPerClip', and 'clips'. Personally, I've looked and looked...even traced with MonoDevelop debugger, yet to no avail. :( Thanks again for any assistance out there. Still Searching... :) jay1025
    Last edited by jay1025; 12-29-2011 at 09:30 AM.


  2. Location
    Seattle, WA, USA
    Posts
    84

    Scoreboard not behaving correctly with more than 2 players?

    Could someone else test and confirm this behaviour?

    I've been seeing some odd behaviour with the scoreboard in my game, so I went back and built Example4 (the shooter with the crates) straight from a fresh install. I then set up a lan game with three computers : one computer as the server (player 1), and the other two as clients (Player 2 and Player 3).

    Upon running the game, I find that the scoreboard only updates for interactions between an individual player and the server. Actions between clients that don't involve the server never get updated.

    Examples:
    server (player 1) kills player 2.

    The server's scoreboard shows this:
    server: 1 kill 0 deaths
    player 2: 0 kills 1 death
    player 3: 0 kills 0 deaths

    So far, so good. Player 2's scoreboard reads this:
    server: 1 kill 0 deaths
    player 2: 0 kills 1 death
    player 3: 0 kills 0 deaths

    Still good. However, player 3's scoreboard reads this:
    server: 1 kill 0 deaths
    player 2: 0 kills 0 deaths
    player 3: 0 kills 0 deaths

    Player 2 will receive the server's update that the server scored a kill because it's coming from the server and it will record it's own death. Player 3 WILL NOT receive the record that player 2 has died because player 2 is not the server.


    All computers now quit and relaunch the game with the same configuration. This time Player 2 kills Player 3. The scoreboards now look like this:

    Server Scoreboard:
    server: 0 kill 0 deaths
    player 2: 1 kill 0 deaths
    player 3: 0 kills 1 death

    again, so far, so good.

    Player 2's scoreboard:
    server: 0 kills 0 deaths
    player 2: 1 kill 0 deaths
    player 3: 0 kills 0 deaths

    Player 2 records it's own kill because it's the one sending the message. However, Player 2 DOES NOT record Player 3's death because it doesn't receive any messages directly from Player 3 and the server doesn't appear to pass it on.

    Player 3's scoreboard:
    server: 0 kills 0 deaths
    player 2: 0 kills 0 deaths
    player 3: 0 kills 1 death

    Same situation as before: Player 3 will record it's own death because it is the one sending the message, but it never receives the message from Player 2 that Player 2 scored a kill.

    I hope you could follow along with that because it can easily get confusing. At first I thought maybe it was something I did when I adapted this to my game, but since I'm testing this from a direct fresh install of the download, I'm guessing it's an actual bug in the scripting. Would it be possible for someone to do an independent test to confirm this?

    @Leepo: Your last reply was over 2 months ago. Have you forgotten about your customers?


  3. Location
    The Netherlands
    Posts
    877
    @Leepo: Your last reply was over 2 months ago. Have you forgotten about your customers?
    Just busy but I'm sorry it started to show in the level of support on this product. So far quite a few issues were usually quickly solved by the help of other users here (thanks guys).

    I have found your problem, it's in the GameSetup playerlist. Clients don't properly keep track of the NetworkPlayer for other clients since it is set in "TellOurName"by using info.Sender. As this is ALWAYS the server for clients, this is set incorrectly.

    To fix this make three changes:

    1) Change TELLOURNAME to this:
    function TellOurName(name : String, fromPlayer: NetworkPlayer, info : NetworkMessageInfo){
    var netPlayer : NetworkPlayer = fromPlayer;
    (add the fromPlayer : NetworkPlayer and set it.)

    2 & 3) Inside AWAKE are two RPCs for TELLOURNAME, change these to:
    networkView.RPC ("TellOurName", RPCMode.AllBuffered, playerName, Network.player);
    I have submitted an update (1.10) to address this bug. This should be live on the asset store within the next 24-48 hours.
    Last edited by Leepo; 02-13-2012 at 11:38 AM.
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  4. Location
    Seattle, WA, USA
    Posts
    84
    Thanks. That worked perfectly

    Any fix for the other problem I mentioned with the chat window not releasing focus after sending a message?

    To recap: after entering a message and hitting enter to send it, keystrokes (other than hitting enter again to start a new message) are no longer recognized until one of the mouse buttons is pressed.


  5. Location
    The Netherlands
    Posts
    877
    For the chat problem:

    1) At the very end of the chatscripts OnGUI, add:
    GUI.SetNextControlName("");
    2) Inside "HitEnter" add:
    GUI.FocusControl("");
    I have added this to the project and will update the assetstore
    Last edited by Leepo; 02-15-2012 at 06:53 AM.
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  6. Location
    Seattle, WA, USA
    Posts
    84
    Thanks. That works wonderfully and seems to have cleared up the last of the issues I've found so far.

    Much appreciated


  7. Location
    Pasadena, CA
    Posts
    39
    Is this 3.5 compatible? Is there a turn based game example in the bunch?
    An Analog Man In A Digital World


  8. Location
    United Kingdom
    Posts
    701
    Hello, I have two questions:

    Q1. Does this work on iPhone / Android?

    Q2. Is it possible to use peer-to-peer style connection using Bluetooth?

    Cheers


  9. Location
    The Netherlands
    Posts
    877
    Is this 3.5 compatible? Is there a turn based game example in the bunch?
    Yep, fully 3.5 compatible. There are no turn based examples, but all the know-how you'd need should be there (mp game browser, simple lobby system, in-game network messages)

    Q1. Does this work on iPhone / Android?
    Q2. Is it possible to use peer-to-peer style connection using Bluetooth?
    1: This is based on Unity networking. Unity networking supports both mobile platforms. The only note is that connectivity
    2: No, Unity networking is server-client based, where one Unity instance acts as server (this could be one of your players). I believe GameCenter on iOS can provide bluetooth multiplayer?
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  10. Posts
    3
    that is great




    ______________________________
    Cheap ERGObaby Organic carrier


  11. Posts
    14
    I haven't been able to get the FixBuildSettings script to work. The M2HNetworking does not show up on my Unity Menu. I've searched this thread and the web but they all seem to show me how to attach the script to a game object which I'm pretty sure is not what I'm supposed to do, someone please point a noob in the right direction? much appreciated...


  12. Location
    The Netherlands
    Posts
    877
    I haven't been able to get the FixBuildSettings script to work. The M2HNetworking does not show up on my Unity Menu.
    This means that Unity hasn't compiled the editor script, most likely you have open error messages in your console that prevent Unity from compiling all scripts.
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  13. Posts
    4
    Sorry if this has been asked before, but is the FPS demo that comes with this server authoritative with client side prediction?


  14. Location
    Japan/Tokyo
    Posts
    323
    Hi.
    I may buy Ultimate Unity Networking project.
    but is it for Unity Master Server?
    I mean Master Server which can download via http://unity3d.com/master-server/

    I just read the explanation text this form.
    Only "Example 2" is for Master Server?

    Thank you.


  15. Location
    The Netherlands
    Posts
    877
    Sorry if this has been asked before, but is the FPS demo that comes with this server authoritative with client side prediction?
    It is not authoritative. There is interpolation (based on Unitys networking example)

    I may buy Ultimate Unity Networking project. but is it for Unity Master Server?
    I mean Master Server which can download via http://unity3d.com/master-server/
    Well yes, whole of Unity networking is based on the master server. Using it without the master server doesn't make much sense.
    Note that you can begin development without installing the master server yourself as you can use Unity's one for your development.
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  16. Posts
    7
    I have a problem, I import the package, the console say me:
    "Assets/Standard Assets/Scripts/FPSWalker.js(10,21): BCE0005: Unknown identifier: 'FPSChat'."
    Any tip to avoid this problem?? I've tried to modify or delete this script but later appear 20 errors please help me


  17. Posts
    7
    Hi Man, I've got 8 errors and every error say me:
    "The name 'List' does not denote a valid type ('not found'). Did you mean 'UnityEngine.Light'?"


  18. Location
    The Netherlands
    Posts
    877
    Quote Originally Posted by robek View Post
    I have a problem, I import the package, the console say me:
    "Assets/Standard Assets/Scripts/FPSWalker.js(10,21): BCE0005: Unknown identifier: 'FPSChat'."
    Any tip to avoid this problem?? I've tried to modify or delete this script but later appear 20 errors please help me
    The default package does not use this script so this is because of a local change.
    Please move the FPSWalker script OUTSIDE of the Standards Assets folder (as the compile order is different)
    See: http://unity3d.com/support/documenta...dvanced29.html


    To fix your second problem, add "import System.Collections.Generic;" to the top of your javascript.
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more


  19. Posts
    7
    Thanks man but now appear new errors:
    "Assets/M2HNetworking/Example2/MultiplayerMenu2.js(461,9): BCE0005: Unknown identifier: 'GameSettings'."
    "Assets/M2HNetworking/Example2/gamescript.js(14,54): BCE0005: Unknown identifier: 'GameSettings'."

    Sorry for the disturb, and for my bad English I am Italian


  20. Location
    The Netherlands
    Posts
    877
    Please verify if you have the file GameSettings.cs (or .js) somewhere in your project. If not: redownload it from the asset store (it is listed on the asset stores file list)
    Mike Hergaarden - M2H Game Studio - http://twitter.com/M2Hgames

    Unity 3D game portal: Wooglie.com
    Free Unity resources/projects M2HCulling, Networking tutorial and more

Page 19 of 21 FirstFirst ... 91718192021 LastLast

Posting Permissions

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