- Home /
How would I do something.
How would I make it so I have many enemys but then when one sees the player it sends a message to a manager that he saw the player(I know how to do this part). Though when the manager receives the message it sends a new message to all of the enemys, with a vector3 sent when one enemy saw the player.
Answer by YoungDeveloper · Jan 10, 2014 at 06:37 AM
I see you understand what approximately you want to do, so why then asking for help? Just google each separate part and there are dozens of examples. And if there is no specif purpose for using sendmessage, use getcomponent instead.
There is a specific purpose for Send$$anonymous$$essage, namely if you don't know what the component is. e.g., if you have a number of different scripts with a Fire function and any one (or more) might be attached, then just do Send$$anonymous$$essage("Fire").
Thanks for that. I didn't mean that there is no specific purpose for sendmessage. I said "if there is no specif purpose", i meant it for him, if he doesn't want it specifically. Because i believe in his case sendmassage can be avoided.)
Your answer
![](https://koobas.hobune.stream/wayback/20220613130012im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
UnityEngine.Input.GetMouseButton(1)) issue 1 Answer
I made a better shader how do i fix[add _Shadow Strength]help???>Sorry that im asking for to much 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
I am having spawning problems. 2 Answers