is there a way to pass a collider to OnTriggerEnter ?

i want to be able to pass a collider to the function
is this posible or is the any thing similar

in a situation where an object has multiple seperate trigger areas(cone shaped)

i want to do something like

case 1 check if trigger entered for gameobject1.collider

case 2 check if trigger entered for gameobject1.collider

You mean like:

OnTriggerEnter(col : Collider) {
}

col will either be the trigger we enter if we are the collider or the collider if we are the trigger. So it will give you the other object is the easiest way to think of it.

And easier way is to tag your object that you’re looking for and then track it that way:

function OnTriggerEnter(col : Collider){
//Debug.Log("Trigger Used");
if(col.gameObject.tag == "Player")
{
if (ThirdPSWalker.invincible == false)
	{
	if (Time.time > lastHitTime + 1.00 )
		{
		target.SendMessage("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver);
		
		var slamDirection = transform.InverseTransformDirection(target.position - transform.position);
			slamDirection.y = 0;
			slamDirection.z = 1;
			if (slamDirection.x >= 0)
				slamDirection.x = 1;
			else
				slamDirection.x = -1;
			target.SendMessage("Slam", transform.TransformDirection(slamDirection));
		 lastHitTime = Time.time;
		}
	}
	}
}

Note:
if(col.gameObject.tag == “Player”)

That means that if my collider was my “Player” (tagged in the inspector) Set off all the other events. I had a problem previously where anything that went into the trigger hurt my player, so I added a simple if-else script.

—Ahhh you got to it before me XP