edited September 2022 in ORK Scripting
In ORK2 is possible to set an event when a combat start or when a combat ends, but...
Is it possible to call an event every time an enemy is defeated in the combat?

We want to call an script function and everytime this happens, but we don't know how. What could be the best way to achieve that?
Post edited by iarrans on
  • Hi @iarrans,
    You can register to the EnemyKilled Event like below


    private void Start()
    {
    ORK.Battle.EnemyKilled += Battle_EnemyKilled;

    }

    private void Battle_EnemyKilled(Combatant combatant)
    {
    Debug.Log(string.Format("{0} you're dead buddy!", combatant.GetName());
    }

  • Oh! Thanks a lot! It's just what i needed! :D
Sign In or Register to comment.