Jump to content

Recommended Posts

Posted (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.

  1. For an example set up, see the Target of Target Frame prefab in the prefab folder.
  2. Create a transparent Image object/container as a child frame of the main target frame.
  3. Place your ToT frame or the provided prefab as a child of the frame you just created.
  4. Plase the TargetOfTargetScript.cs on the container frame you created.
  5. Fill in the references.
  6. 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:

Just get the scripts:

 

Unity_paolaSIm2V.pngUnity_X0TaYPodZT.thumb.png.659ecc578a09c6856e9dff8ec02734c9.pngUnity_84mBl0ylDF.thumb.png.c1d8093e346103b0537a8d656bf4d1dd.png

Unity_CebqokqSxI.thumb.png.a9e8dcb0c2370883294c513cc59cca15.png

Edited by jandd661
Open source
Posted
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! :)

Posted

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

  • jandd661 changed the title to Target of Target and WoW style targeting
  • 3 weeks later...
Posted (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 by Aizen
Posted
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.

Posted

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. 

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recommended Cloud Solution


    ksweb.net

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.