Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

uMMORPG Official Thread

Discussion in 'Assets and Asset Store' started by mischa2k, Dec 29, 2015.

  1. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    wow thank a lot for that tip. i really apreciate.
     
  2. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    how to add autoattack to the players?
     
  3. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please be more specific. What exactly do you mean with auto attack?
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMMORPG V1.50 is now on the Asset Store:
    • Upgrade Info: Player and Monster animation controllers have changed a bit, make sure to adjust it in your own MMO project too.
    • Player moving state: if casting is canceled because of a dead target, it will remain in the MOVING state instead of going back to IDLE while actually moving
    • Player.SelectionHandling refactored. It uses CanAttackType instead of type checking the entity manually and is better structured
    • Player.SelectionHandling click movement uses agent.NearestValidDestination extension now too, which fixes some glitches when trying to move into an unreachable area
    • Monster, Player animation controllers IDLE parameter removed, because it can be indirectly derived from !MOVING, !CASTING, !DEAD.
    • Player and Monster only play the moving animation if agent.velocity != zero. Fixes some movement glitches where the animation might be delayed due to latency or where it started too early while the path was still pending
    • Player.LoadSkillbar loads learned skills if no skillbar was saved before. This greatly improves the first experience for a new player
    • NetworkNavMeshAgent warp detection to avoid issues where the agent would try to walk to a place that the server actually warped it too, e.g. when sliding to the respawn point
     
    Zhenite likes this.
  5. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    Folks,

    Heres a YouTube video of my progress while i have been working on integrating UMA with uMMORPG.



    * with v2.1 i was also able to add face expressions and skin color which ill show on my next update, my plan is to see if i can turn it into a plug in for uMMORPG for anyone that wants to add UMA avatars into their own projects.

    -J
     
    SammmZ, Pwnoas, Zhenite and 3 others like this.
  6. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    I think he means when you're standing still, and a entity is hitting you. You don't auto attack them unless you click them. Toggable Option for this would be nice.

    Also is there any plans for Instanced Zones? Like Copy Certain Coordinates x: 0, y: 0 - x: 100 y:100

    Then that makes a instanced area, useful for stuff like dungeons, pvp areas.
     
  7. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    yes this is what i means, is there a way that player autodefend from skeleton when they attack you. without the need of click on them.?
     
    Last edited: Jan 10, 2017
  8. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    That's not implemented at the moment. You could create your own event like bool IsUnderAttack() that loops through the surrounding monsters and checks if any of them is attacking us. Or use OnAggro (see Monster.cs)

    Unet's Phase 3 (simulation server) will take care of instances. I didn't forget about your PM by the way, will check it out soon.
     
    Natalynn likes this.
  9. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Skinned Mesh render equipment hint guys? The Mount Points asset seems fine enough but how hard is the implemention because I'm kinda locked out from my current development stand point thanks to it :)
     
  10. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    Quick question: where's the piece of code that makes the equipment auto equip on click?
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Player.RefreshLocation

    I am still researching it.
     
    aranthel09 likes this.
  12. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    MountPoints provides an API, so for example; on Awake() you can mMountPoints = GetComponent<MountPoints>() and then use things like .AddSkinnedItem() or .RemoveSkinnedItemFromPath() to add/remove skinned meshes, one of the cleaner options i found was to place your skinned meshes in a Prefab/Armor path so you can then use the path to Add/Remove them.

    Im not at my home PC so i cant provide examples, but i would suggest take a blank uMMORPG project and add mountpoints.

    Here is an Example:
    Code (CSharp):
    1.         switch (inventory[inventoryIdx].category)
    2.         {
    3.             case "EquipmentLegs":
    4.                 mMountPoints.AddSkinnedItem("Prefabs/Armor/" + gender + "/Legs/" + inventory[inventoryIdx].name);
    5.                 break;
    6.             case "EquipmentChest":
    7.                 mMountPoints.AddSkinnedItem("Prefabs/Armor/" + gender + "/Chest/" + inventory[inventoryIdx].name);
    8.                 break;
    9.             case "EquipmentHead":
    10.                 mMountPoints.AddSkinnedItem("Prefabs/Armor/" + gender + "/Head/" + inventory[inventoryIdx].name);
    11.                 break;
    12.             case "EquipmentHands":
    13.                 mMountPoints.AddSkinnedItem("Prefabs/Armor/" + gender + "/Hands/" + inventory[inventoryIdx].name);
    14.                 break;
    15.             case "EquipmentFeet":
    16.                 mMountPoints.AddSkinnedItem("Prefabs/Armor/" + gender + "/Feet/" + inventory[inventoryIdx].name);
    17.                 break;
    18.         }
    -J
     
    Last edited: Jan 11, 2017
    MHolmstrom likes this.
  13. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    Found it but yet still dont know why equipment is not equipping on click. Only thing I changed was defaultTypes values to my own and, ofc, changed the value of the gameObjects with the PlayerEquipmentLocation. So, I'm gonna change my question a little bit:

    How to change equipmentType category appropriately, without breaking the click-to-equip and other stuff? Ty!

    EDIT: Nevermind, I found out. For some reason I coulnd't figure out yet, all places must have the "Equipment" string before the actual name. E.g.: It can't be called just Helmet. It must be EquipmentHelmet, so it parses the Equipment part and apply all the logic after that.
     
    Last edited: Jan 11, 2017
  14. Telparion

    Telparion

    Joined:
    Nov 19, 2016
    Posts:
    3
    Hi,

    I've got a serious problem and it's hard to see if others reported it already.

    After importing, opening the scene, and doing "File --> Run" as specified on Quick Start documentation ( https://noobtuts.com/unity/MMORPG ), I have a blank view (whitescreen) with nothing happening at all.

    There is no UI to continue the quick start steps. (ie picking Server etc).
    I use unity 64 bit, 5.4.3f1, and error occurs on WIndows 7 with 32 and 64 bits builds.
     
  15. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Can you make a screenshot of the whole Unity editor so I can see the Hierarchy, Scene, etc?
     
  16. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    How can I force remove an equipment? I currently want that if I equip a 2Handed weapon, it unequips my Shield equipment type. I already have a helper function that verifies if a Shield is equipped and another one that verifies if an item has the bool "twoHanded" on.

    Code (CSharp):
    1.  
    2.  
    3. [Command]
    4.     public void CmdUseInventoryItem(int index) {
    5.         // validate
    6.         if ((state == "IDLE" || state == "MOVING" || state == "CASTING") &&
    7.                  0 <= index && index < inventory.Count && inventory [index].valid) {
    8.             // what we have to do depends on the category
    9.             //print("use item:" + index);
    10.             var item = inventory [index];
    11.             if (canUseItem) {
    12.                 if (item.category == "Potion") {
    13.                     // use
    14.                     curHP += item.usageHp;
    15.                     curMANA += item.usageMp;
    16.                     exp += item.usageExp;
    17.  
    18.                     // decrease amount or destroy
    19.                     if (item.usageDestroy) {
    20.                         --item.amount;
    21.                         if (item.amount == 0)
    22.                             item.valid = false;
    23.                         inventory [index] = item; // put new values in there
    24.                     }
    25.                 } else if (item.category.StartsWith ("Equipment")) {
    26.                     // for each slot: find out if equipable and then do so
    27.                     for (int i = 0; i < equipment.Count; ++i) {
    28.                         if (CanEquip (equipmentTypes [i], item)) {
    29.  
    30.                             if (item.category == "RightHand" && item.twoHanded== true) {
    31.                                 SwapInventoryEquip (index, i);
    32.                                 if (getLeftHand ()) {
    33.                                     //unequip item
    34.                                 }
    35.                             } else if(item.category == "LeftHand" && getTwoHanded() == true){
    36.                                 SwapInventoryEquip (index, i);
    37.                                 //unequip item
    38.                             }
    39.                         }
    40.                     }
    41.                 }
    42.             }
    43.         }
    44.     }
    45.  
    I thought of this solution. However, I dont know how to make the "unequip shield" part.
     
    Last edited: Jan 11, 2017
  17. Telparion

    Telparion

    Joined:
    Nov 19, 2016
    Posts:
    3
    Here it is vis:
    I only opened the scene after downloading and imponting uMMORPG.
     

    Attached Files:

  18. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Check out the Player.CmdEquip / Swap / Inventory functions, there's a lot of useful stuff in there.

    You are using an older Unity version. Delete the project, download Unity 5.5.0p3 (the patch version) and then download uMMORPG again. https://unity3d.com/unity/qa/patch-releases
     
  19. Telparion

    Telparion

    Joined:
    Nov 19, 2016
    Posts:
    3
    Thanks will try that!
    Note that documentation says:
    1. Install and open Unity 5.4.1p2 or newer.
    ... so I thought I was covered ;)
     
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Oh thanks for letting me know, this changes often.
     
  21. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    Ty for the hint, Vis! Managed to make a 2 handed equipment unequip the other hand's equipment!

    Now, is it possible to try and integrate your VOXL asset crafting system into uMMORPG? I'm giving a thought on buying VOXL if that's possible!
     
  22. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    i am trying to add animations to my monsters. but nothing works i also check some videos on youtube but still they are in T pose, can you make a video about how to edit skeleton moster and add another 3D model?

    UPDATE
    This video help me a lot. it show how to add animations with your asset
     
    Last edited: Jan 12, 2017
  23. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    So it's not a hard process at all? Do I have to make a brand new script in order to get it working or simply modify existing code from the current inventory handler? I don't want to get something I cannot handle but I should be fine just a bit paranoid :)
     
  24. ianmhart

    ianmhart

    Joined:
    Mar 16, 2014
    Posts:
    28
    i just tried it to android device. the interface is small. any tut how the interface being fit on every adroid device screen resolution.
     
  25. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    Btw, how am I supposed to add some custom behaviour to skills? I thought of maybe creating a script and attach it to the ScriptableObject as a gameobject, but it would cause all players refer to that same gameobject.

    E.g.: I have a skill that buffs Luck and Dexterity based on my Int.
     
  26. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    i also want the same.
     
  27. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Good morning everyone!

    Yup, you could pretty much just copy it over and add the UI part. I mentioned here before that I am considering adding the same or similar crafting system to uMMORPG. I haven't done it yet because there are a few more things to consider like item plussing.

    Select the Canvas and play around with the CanvasScaler component. You can use Scale with Screen Size etc.

    I usually add properties to the skill like buffsDexterity. You could add buffsDexterityPerInt, or implement custom behaviours as you mentioned.
     
    Natalynn likes this.
  28. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: finished the new Scene for V1.51:
    2017-01-11a.png

    The whole thing is much more visually pleasing than before. The big building also allows us to test movement edge cases more easily, like the ones that have been reported lately. The monsters inside of the tents won't do random movements, which adds another test scenario.
     
    camta005, jagatai33 and WoogyIM like this.
  29. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    Looking good! Is it possible to make a NPC to retreat back to the original placed transform? At the moment, I have a guard and I can attack it and it won't never go back to his original spot.
     
    Last edited: Jan 12, 2017
  30. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    Wow, the new scene looks awesome!

    I thought of custom behaviours. I even created a prefab with a script attached. Problem is: all my characters refer to the same scriptableobject, thus, they all refer to that same gameobject, meaning all of them call the same object. Am I missing something important here?
     
  31. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    @vis2k

    looks like 5.5.0p4 is out and has some neat fixes including:
    Code (CSharp):
    1. (853316, 826931) - Multiplayer: Made sure isLocalPlayer works as expected on OnDestroy.
    -J
     
    camta005 likes this.
  32. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello guy, how are all today? I hope all good, I have Question how is the progress for the implementation for create account? Do you think you can implement soon? or wit the alternative that one of the members did, do you think any one can help to to implement in the project something like video tutorial or some guide?. Thank you for all your hard work.
     
  33. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You could add something to the IDLE state like "if not at start position, go to start".

    You could instantiate that prefab into the game world. I am not sure if this makes sense for your system, but it makes sense for the problem that you described.

    Oh wow, thanks a lot for letting me know. This has affected uMMORPG since the start, I can't wait to remove my workaround.

    I am good, thanks. Account creation is usually handled by your content management system (website). You have a lot of options like drupal, phpbb, ipboard, etc. I am still researching this to find the best option for my own MMO.
     
    Natalynn likes this.
  34. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    this video looks very boring, but it helps me a lot and now every import works fine for me!

    btw: @vis2k your asset is great, awesome etc ;)
     
  35. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Thank you.
     
  36. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    Updated the code for uMMORPG Version 1.52 - https://forum.unity3d.com/threads/ummorpg-official-thread.376636/page-44#post-2927731

    This was made by me, XML Account Saving/Loading. The account will be created as enter details on the login screen. This can easily be modified to have a actual register screen in-game and output it like that if needed, at the moment this is the fastest way.

    Features:
    - Account Banning
    - Account Muting
    - Username, Passwod
    - Permissions (Used for Admin, Moderator, etc).

    Output:

    Code (csharp):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <account>
    4.   <username>admin</username>
    5.   <password>admin</password>
    6.   <permission>PLAYER</permission>
    7.   <isBanned>false</isBanned>
    8.   <isMuted>false</isMuted>
    9. </account>

    Account Creation Tutorial with ingame:

    1. Add this CSharp File, name it AccountCredentials.cs
    Code (csharp):
    1.  
    2.    public class AccountCredentials {
    3.  
    4.         public static string Username { get; set;}
    5.         public static string Password { get; set;}
    6.         public static string Permissions { get; set;}
    7.         public static bool isBanned { get; set;}
    8.         public static bool isMuted { get; set;}
    9. }
    2. Then open up Database.cs and Replace or add the following methods below.
    - Also Locate CharacterSave Method, and remove "Directory.CreateDirectory(AccPath(player.account));"

    Code (csharp):
    1.  
    2.     public static string AccPath(string account) {
    3.         return Path.Combine(path, account);
    4.     }
    5.  
    6.     static string CharPath(string account, string charName) {
    7.         return Path.Combine(AccPath(account) + "\\Characters\\", charName);
    8.     }
    9.  
    10.     public static void AccountCreate(string account, string password) {
    11.         Directory.CreateDirectory(AccPath(account) + "\\Characters\\");
    12.         var settings = new XmlWriterSettings{ Encoding=Encoding.UTF8, Indent=true };
    13.  
    14.         using (var writer = XmlWriter.Create(AccPath(account) + "/" + account + ".user", settings)) {
    15.             writer.WriteStartDocument();
    16.             writer.WriteStartElement("account");
    17.             writer.WriteElementValue("username", account);
    18.             writer.WriteElementValue("password", password);
    19.             writer.WriteElementValue("permission", "PLAYER");
    20.             writer.WriteElementValue("isBanned", AccountCredentials.isBanned);
    21.             writer.WriteElementValue("isMuted", AccountCredentials.isMuted);
    22.             writer.WriteEndDocument();
    23.         }
    24.     }
    25.  
    26.     public static void AccountLoad(string Username) {
    27.         var fpath = AccPath(Username) + "/" + Username + ".user";
    28.  
    29.         if (File.Exists(fpath)) {
    30.         var settings = new XmlReaderSettings{ IgnoreWhitespace = true };
    31.         using (XmlReader reader = XmlReader.Create(fpath, settings)) {
    32.             reader.ReadStartElement("account");
    33.             AccountCredentials.Username = reader.ReadElementContentAsString();
    34.             AccountCredentials.Password = reader.ReadElementContentAsString();
    35.             AccountCredentials.Permissions = reader.ReadElementContentAsString();
    36.             AccountCredentials.isBanned = reader.ReadElementContentAsBoolean();
    37.             AccountCredentials.isMuted = reader.ReadElementContentAsBoolean();
    38.             Debug.Log(AccountCredentials.Username + ", " + AccountCredentials.Password + ", " + AccountCredentials.Permissions);
    39.             reader.ReadEndElement();
    40.             }
    41.         }
    42.     }
    43.  
    44.     public static Dictionary<string, string> CharactersForAccount(string account) {
    45.         var dict = new Dictionary<string, string>();
    46.         if (Directory.Exists(AccPath(account))) {
    47.             foreach (string fpath in Directory.GetFiles(AccPath(account) + "\\Characters\\")) {
    48.                 // open the xml file, read the className node
    49.                 var settings = new XmlReaderSettings{ IgnoreWhitespace=true };
    50.                 using (XmlReader reader = XmlReader.Create(fpath, settings)) {
    51.                     reader.ReadStartElement("character");
    52.                     string className = reader.ReadElementContentAsString();
    53.                     dict[Path.GetFileName(fpath)] = className;
    54.                 }
    55.             }
    56.         }
    57.         return dict;
    58.     }
    3. Open NetworkManagerMMO.cs, and add this import using "using System.IO;"

    Replace isValidAccount with:
    Code (csharp):
    1.  
    2.     bool IsValidAccount(string account, string password) {
    3.         if (!Utils.IsNullOrWhiteSpace(account) && !Utils.IsNullOrWhiteSpace(password)) {
    4.             var fpath = Database.AccPath(account) + "/" + account + ".user";
    5.             if (!File.Exists(fpath)){
    6.                 Database.AccountCreate(account, password);
    7.             }
    8.             Database.AccountLoad(account);
    9.             if (!password.Equals(AccountCredentials.Password)) {
    10.                 return false;
    11.             }
    12.             if (AccountCredentials.isBanned) {
    13.                 return false;
    14.             }
    15.             return true;
    16.         }
    17.         return false;
    18.     }
     
    Last edited: Jan 20, 2017
    camta005, bartuq, Wansyth and 4 others like this.
  37. leedoctorz

    leedoctorz

    Joined:
    Nov 30, 2015
    Posts:
    1
    I've recently taken a look on ummorpg. I'm very new to UNET, so now I'm just digging around the imported scripts. But I'm so impressed by the simplicity of the project so far. Thanks for your great effort, vis2k!
    Now I have a quick question; what is the most recommended way to make synced, interactive objects such as doors, hand levers, chests and so on? I don't want to spoil the elegance of the current project so it's quite difficult to start on. Thanks in advance!
     
  38. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Cool, mind if I link to it from the documentation?

    Thanks. Don't worry about spoiling the elegance, just hack around and learn. You could add a Door script, have a [SyncVar] bool state; for open/closed and on clients play the animation depending on if it's open or closed.
     
    Natalynn likes this.
  39. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    Yeah sure ^-^​
     
  40. michaelbeers

    michaelbeers

    Joined:
    Aug 19, 2015
    Posts:
    18
    @vis2k @tvirus06 Maby an idea to create some abstracts and factories to create multiple "save" types, XML, JSON and SQL for example
     
  41. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You should be able to replace the existing Database.cs file with any other without problems already, as long as the functions have the same name and parameters.
     
  42. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164

    Hello Any one success adding this code?
     
  43. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Seems to work quite well. Also that way it is really nice to see how characters are organised.
     
    Natalynn likes this.
  44. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    can i get a screenshot ?
     
  45. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    when i add a shield it is not in my arm. is on the floor how can i resolve this problem?

    any help with this?

    sorry for my english

    Update: i resolve the problem
    i pause the game and move the position of the shield after that i disable gravity on Rigidbody and it works!!
     

    Attached Files:

    Last edited: Jan 13, 2017
    mischa2k likes this.
  46. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Not sure what you might want to look, but here is some (on character selection i made small modification, just thought i`ll show player group info out to screen).


    And here is the directory layout after character has been created and also account xml file content. Characters data as you can see stays on own xml files.



    P.S: @luis29vm i`ll try check that private message and reply you as soon as i can
     
    Last edited: Jan 14, 2017
  47. aranthel09

    aranthel09

    Joined:
    Jul 17, 2015
    Posts:
    66
    I'm trying to implement a system that shows an Indicator in game that varies accordingly to skill's AoERatio. It works perfecly if I'm playing as host. However, it doesn't work if I'm playing as client.


    Code (CSharp):
    1.  [Command]
    2.     public void CmdUseSkill(int skillIndex) {
    3.         // validate
    4.         if ((state == "IDLE" || state == "MOVING" || state == "CASTING") &&
    5.             0 <= skillIndex && skillIndex < skills.Count) {
    6.             // can the skill be casted?
    7.             if (skills[skillIndex].learned && skills[skillIndex].IsReady()) {
    8.                 // add as current or next skill, unless casting same one already
    9.                 // (some players might hammer the key multiple times, which
    10.                 //  doesn't mean that they want to cast it afterwards again)
    11.                 // => also: always set skillCur when moving or idle or whatever
    12.                 //  so that the last skill that the player tried to cast while
    13.                 //  moving is the first skill that will be casted when attacking
    14.                 //  the enemy.
    15.                 if(skills[skillIndex].category3 == "SkillShot" && quickCast == false){
    16.  
    17.  
    18.                     StartCoroutine (WaitForMouseClick(skillIndex));
    19.  
    20.  
    21.                 }else if (skillCur == -1 || state != "CASTING"){
    22.                     skillCur = skillIndex;
    23.                 }
    24.                 else if (skillCur != skillIndex){
    25.                     skillNext = skillIndex;
    26.                 }
    27.  
    28.                 }
    29.             }
    30.         }
    31.    
    32.     IEnumerator WaitForMouseClick(int skillIndex) {
    33.         Debug.Log("Waiting for princess to be resqued...");
    34.         //Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    35.         skillshotIndicator = (GameObject)Instantiate (skills[skillIndex].indicator, hit.point, Quaternion.identity);
    36.         skillshotIndicator.transform.localScale = new Vector3 (skills[skillIndex].aoeRadius, 0.1f, skills[skillIndex].aoeRadius);
    37.  
    38.         skillshotIndicator.transform.parent = null;
    39.         skillshotIndicator.transform.position = MouseCoords + Vector3.up * 0.01f;
    40.         skillshotIndicator.transform.up = hit.normal; // adjust to terrain normal
    41.         yield return new WaitUntil(() => Input.GetKeyDown(KeyCode.Space));
    42.  
    43.         Destroy (skillshotIndicator);
    44.         if (skillCur == -1 || state != "CASTING"){
    45.             skillCur = skillIndex;
    46.         }
    47.         else if (skillCur != skillIndex){
    48.             skillNext = skillIndex;
    49.         }
    50.     }
    How am I supposed to proceed in order to make the Coroutine part work on clients aswell? I'm new to UNet, so simple things like "what methods should be Command, Server, etc." still get me. Ty!

    Edit: I want that only the client that used the skill can see the indicator!
     
  48. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    I thought to try and see what can be done when i`ll try change HealthMana.cs and HealthMana canvas object.
    Here is small snapshot.







    Code (CSharp):
    1. // open script Scripts\_UI\UIHealthMana.cs
    2. // add after mpStatus serializefield definition
    3.     [SerializeField] Text charShortInfo;
    4.     [SerializeField] GameObject charIconPlaceholder;
    5.  
    6. // inside Update method
    7. // add
    8.  
    9.         charShortInfo.text = "Lv." + player.level + " " + player.name;
    10.  
    11.         charIconPlaceholder.GetComponent<Image>().sprite = player.classIcon;
     
    mischa2k likes this.
  49. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    my game delete the shadows aftert i build the game, but in unity editor there is shadow? what can i do?
     
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMMORPG V1.51 is now on the Asset Store:
    • Added new Temple 3D model
    • Restructured Scene
    • Campfire particle position adjusted a bit
    Progress: I am working on the server list right now.

    You can use TargetRpc to call call a function on the client (by the server). Or use LateUpdate and just draw your effect while skillCur is between 0 and skills.Count (as in: a skill is currently being casted).

    Probably a Unity misconfiguration somewhere. uMMORPG doesn't do anything with shadows, except having them turned on in the directional light.
     
    camta005 likes this.