jandd661 Posted May 11, 2020 Report Posted May 11, 2020 (edited) Latest Updates: 5/14/20 Fixed targeting behavior of friendly targets. Right clicking on a friendly target will no longer put you in combat mode if friendly target can be attacked by others. 5/13/20 Full rewrite of the Targeting. ClearTarget.cs has been replaced with TargetingTweaks.cs. Please replace the ClearTarget.cs with TargetingTweaks.cs. 5/12/20 Fix has been implemented into the updated package (Download link below). Please send me your feedback if you have problems. Thanks! Unfortunately, do too a recent job change that requires me to be gone for weeks at a time, I am unable to maintain these scripts properly and promptly. I encourage and permit anyone who wants to take the reins and use these scripts to develop their own versions. These scripts can be considered as OPEN SOURCE. Use them as you wish. I apologize for any inconvenience. Name: Target of Target and Targeting Tweaks Updated: 2020-05-14 Version: BETA By: 1stGenGamer Note: If you have any problems or issues please send me a message on discord https://discord.gg/5hA83k. Please understand that I'm sharing this because it may be useful for someone. It may all break with a Atavism update. You do not need to use both if there is one you don't want. This package was built and tested in in Unity v2019.2 with Atavsim 10.1 Package includes: Prefab of ToT frame - I made it in the UI of the MainWorld scene of Atavsim 10.1. Target Tweaks script TargetingTweaks.cs ------------------------------------- Tweeks the default targeting behavior to deselect the target based on distance and if you click off the target. Similar to WoW. Atavism currently does not restrict the targeting distance. So a known issue is, if the player clicks on a target beyond the scripts max target distance, the target frame will briefly appear then disappear. Place TargetingTweaks.cs on all your character prefabs in Assets/Resources. Your in the right place if you see "Atavism Mecanim Mob Controller 3D" script component. "Enable" turn it on and off. This is publicly available FirstGenMods.ClearTarget.Enable {get; set;} "Max Retain Target Distance" is the distance you can go from the target without loosing the target. Default is 100. "Targetable Layer Number" is the layer id of targetable objects. You can get this by expanding the "Layer" dropdown at the top of the inspector. Default is 8."Combat State Property Name" the name of the property that indicates it's current combat state. Default is "combatstate" (no quotes)."Combat State Time Property Name" the name of the property that indicates it's current combat state time. Default is "combatstate_t" (no quotes). Target of Target (ToT) script TargetOfTarget.cs ----------------------------------------------- Adds ToT functionality. Currently does not display pet's target. For an example set up, see the Target of Target Frame prefab in the prefab folder. Create a transparent Image object/container as a child frame of the main target frame. Place your ToT frame or the provided prefab as a child of the frame you just created. Plase the TargetOfTargetScript.cs on the container frame you created. Fill in the references. Look at the prefab in the Prefab folder for an example. You may be able to drop the prefab on to your Canvas at it will just work. I recommend placing it as a child of the main target frame. Main Target Frame |-- Container Frame <-- Script here |-- ToT Frame "Enable" turn it on and off. This is publicly available FirstGenMods.TargetOfTarget.Enable {get; set;} "Frame Position" The Rec Pos X and Pos Y the frame will move to when loaded. Once set, you can drag it somewhere in the editor so you can work on it. "Dead Property Name" the name of the target property that indicates dead. Default is "deadstate" (no quotes). "Target Of Target Frame" Reference to the child ToT frame. "Name, Description, Species, Level" TextMeshPro text objects. "Default Sprite" Sprite used for the portrait if the target one can't be found. "Portrait Image" The Image object used to display the portrait. "Level Property Name" the name of the target property that indicates it's level. Default is "level" (no quotes). "Current Health Property Name" the name of the target property that indicates it's current health. Default is "health" (no quotes). "Max Health Property Name" the name of the target property that indicates it's max health. Default is "health-max" (no quotes). "Health Text" the TextMeshPro text object used to display the health numbers. "Fill Image" Image object with slider used to display the health bar. Download Unity Package: https://drive.google.com/open?id=11W_pnLlTOed4haDvw3KO25eIdF3a5TXT Just get the scripts: TargetingTweaks.cs https://bitbucket.org/JANDD661/workspace/snippets/Lry5M7/targetingtweakscs TargetOfTarget.cs https://bitbucket.org/JANDD661/workspace/snippets/Eb75A8/targetoftargetcs Edited June 20, 2020 by jandd661 Open source Sergey and Aizen 2 Quote
Dutch Posted May 11, 2020 Report Posted May 11, 2020 24 minutes ago, jandd661 said: Name: Target of Target and Clear Target Version: BETA By: 1stGenGamer Note: If you have any problems or issues please send me a message in the Atavsim discord. Please understand that I'm sharing this because it may be useful for someone. It may all break with a Atavsim update. This package was built and tested in in Unity v2019.2 with Atavsim 10.1 Package includes: Prefab of ToT frame - I made it in the UI of the MainWorld scene of Atavsim 10.1. Target Deselect script ClearTarget.cs ------------------------------------- Tweeks the default targeting behavior to deselect the target based on distance and if you click off the target. Similar to WoW. Atavism currently does not restrict the targeting distance. So a known issue is, if the player clicks on a target beyond the scripts max target distance, the target frame will briefly appear then disappear. Place ClearTarget.cs on all your character prefabs in Assets/Resources. Your in the right place if you see "Atavism Mecanim Mob Controller 3D" script component. "Enable" turn it on and off. This is publicly available FirstGenMods.ClearTarget.Enable {get; set;} "Max Retain Target Distance" is the distance you can go from the target without loosing the target. Default is 30. "Targetable Layer Number" is the layer id of targetable objects. You can get this by expanding the "Layer" dropdown at the top of the inspector. Default is 8. Target of Target (ToT) script TargetOfTarget.cs ----------------------------------------------- Adds ToT functionality. Currently does not display pet's target. For an example set up, see the Target of Target Frame prefab in the prefab folder. This should be on a transparent Image object/container. Your ToT frame should be a chield of that frame. Look at the prefab in the Prefab folder for an example. You may be able to drop the prefab on to your Canvas at it will just work. "Enable" turn it on and off. This is publicly available FirstGenMods.TargetOfTarget.Enable {get; set;} "Frame Position" The Rec Pos X and Pos Y the frame will move to when loaded. Once set, you can drag it somewhere in the editor so you can work on it. "Dead Property Name" the name of the target property that indicates dead. Default is "deadstate" (no quotes). "Target Of Target Frame" Reference to the child ToT frame. "Name, Description, Species, Level" TextMeshPro text objects. "Default Sprite" Sprite used for the portrait if the target one can't be found. "Portrait Image" The Image object used to display the portrait. "Level Property Name" the name of the target property that indicates it's level. Default is "level" (no quotes). "Current Health Property Name" the name of the target property that indicates it's current health. Default is "health" (no quotes). "Max Health Property Name" the name of the target property that indicates it's max health. Default is "health-max" (no quotes). "Health Text" the TextMeshPro text object used to display the health numbers. "Fill Image" Image object with slider used to display the health bar. Download: https://drive.google.com/open?id=11W_pnLlTOed4haDvw3KO25eIdF3a5TXT Thanks for the share! Quote
jandd661 Posted May 11, 2020 Author Report Posted May 11, 2020 Anytime Dutch. Also, package has been updated to hopefully resolve an issue reported on Discord. Changes are in ClearTarget.cs. Dutch 1 Quote
rozumzumor Posted May 11, 2020 Report Posted May 11, 2020 Hello all. I've fixed the known issue about blinking target frame in case player clicks on a target beyond the scripts max target distance. I introduced 'Outside Target Distance Timeout' parameter, it sets timeout for the frame to disappear (default - 10 seconds). If player will reach the target inner distance to the enemy (e.g. Max Retain Target Distance - 1) during this time then the frame will remain until the player leaves the target radius. If the player will stay away from the enemy without goin inside the target radius then the frame will disappear after timeout. For me this solution is fine, maybe someone also would use it. Please let me know in case of any related issues. ClearTarget.cs Quote
jandd661 Posted May 11, 2020 Author Report Posted May 11, 2020 Confirmed Bug: ClearTarget.cs is preventing display of player effects on the target I'm working on it Quote
jandd661 Posted May 13, 2020 Author Report Posted May 13, 2020 Rewrite of the Targeting. Update ready. Martin (Dragonsan) 1 Quote
Aizen Posted May 14, 2020 Report Posted May 14, 2020 (edited) jandd661 Good Work i love that , did not even know we missing that Hope Atavism Team adds your changes to New Updates Edited May 14, 2020 by Aizen jandd661 1 Quote
jandd661 Posted May 14, 2020 Author Report Posted May 14, 2020 5/14/20 Fixed targeting behavior of friendly targets. Right clicking on a friendly target will no longer put you in combat mode if friendly target can be attacked by others. spywaretof 1 Quote
SaltySquid Posted May 15, 2020 Report Posted May 15, 2020 This is good stuff. Thanks for sharing your work! jandd661 1 Quote
Aizen Posted June 2, 2020 Report Posted June 2, 2020 (edited) target of target player to player dont show i dont know if thats is normal coos in wow you can see othere players target you Edited June 2, 2020 by Aizen Quote
jandd661 Posted June 2, 2020 Author Report Posted June 2, 2020 4 minutes ago, Aizen said: target of target player to player dont show i dont know if thats is normal coos in wow you can see othere players target you Thanks Aizen. I will look into that. I'm currently on a business trip so it might be a few days. Quote
jandd661 Posted June 20, 2020 Author Report Posted June 20, 2020 Unfortunately, do too a recent job change that requires me to be gone for weeks at a time, I am unable to maintain these scripts properly and promptly. I encourage and permit anyone who wants to take the reins and use these scripts to develop their own versions. These scripts can be considered as OPEN SOURCE. Use them as you wish. I apologize for any inconvenience. Quote
Martin (Dragonsan) Posted June 25, 2020 Report Posted June 25, 2020 It's fine, I hope that everything is fine on your end, and someday you will come back to us. There is nothing you should apologize for. You were active and supportive. There is always a place in our community for you. Quote
Xinux Posted January 28, 2022 Report Posted January 28, 2022 Been trying to get this to work with the latest version but ClientAPI.GetTargetObject().MobController.Target; seems to always return -1 for the Oid number. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.