🛠️Custom Integrations
Here, you will learn how to make your own integrations.
This page is for you to learn how to integrate Universal AI with your controller.
Damage Your Player
Damage your AI
//Your Weapon Raycast class
using UniversalAI;
//Dont forget using UniversalAI;
public float MyDamage = 30;
//This is a example void, you can use your own void too!
public void MyRaycast
{
RaycastHit hit;
Physics.Raycast(transform.position, transform.forward, out hit, 10)
{
UniversalDamageable damageable = hit.GetComponent<UniversalDamageable>();
if(damageable != null)
{
damageable.TakeDamage(MyDamage);
}
}
}Last updated
Was this helpful?