ok so i have the setup as follows
Enemy
Player
Script
using UnityEngine;
using System.Collections;
public class Battler : BattleControl {
public NavMeshAgent navAgent;
void OnCollisionEnter(Collision other)
{
Debug.Log("1");
}
void beingattacked()
{
isbeingattacked = true;
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
beingattacked();
}
}