Aggro Overlay 2d

You are here:
← All Topics
Version: 2019.100 Requirements:uMMORPG2d, ToolsScript Define:None
Core Changes:YesTutorial Video:No

Description

This Aggro Overlay Indicator allows monsters to show an icon above their head when switching to a new player target.


Core Changes

  1. [Required] Open the following script AggroArea.cs. See Changes...

    Locate this line:
    // same as OnTriggerStay
        void OnTriggerEnter(Collider co)
        {
            Entity entity = co.GetComponentInParent<Entity>();
            if (entity) owner.OnAggro(entity);
        }

    Modify to match:

    // same as OnTriggerStay
        void OnTriggerEnter(Collider co)
        {
            Entity entity = co.GetComponentInParent<Entity>();
            if (entity) owner.OnAggro(entity);
            
            
            if (owner is Monster)
            	Utils.InvokeMany(typeof(Monster), (Entity)owner, "OnClientAggro_", entity);
        }

Installation

  1. [Required] Apply all required core changes.
  2. [Required] Add all prefabs from the Prefabs folder to your Monsters via drag-n-drop.
  3. [Required] Link the AggroOverlayPosition prefab to your monsters Aggro Overlay slot in the inspector.
  4. [Optional] Install our Floater addon to make the icon float up and down.

Screenshots

Support the IndieMMO Team Today!

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.