how to give target (transfrom) to another object

hey everyone,

I’m working on a project that has a wandering probe that will alert other enemy’s in a set distance of the players presence when he gets too close. I can detect the player and get that he’s too close, alert the other enemy’s in the area with OnTriggereEnter and SendMessage.

What I’m having difficulty with is making the ‘alerted’ enemy’s use the target of the player. I got the player from Trigger.gameObject.transform (Trigger in place of other), but can’t then do anything with it.

I thought about var public and/or static, but there maybe other wandering probes about and that could cause problems right?

Any pointers or help is greatly appreciated :slight_smile:

Thanks in advance, garf :slight_smile:

Im a bit confused by exactly what the issue is, but you can send a transform through SendMessage.

    gameObject.SendMessage ("Alert", Trigger.gameObject.transform);
	
    void Alert(Transform transform) {

    }

Thanks that got me sorted out, was getting a bit caught up on the sending values and such.

I tip my hat to my good sir :slight_smile: