Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by L20GAMES · Jan 01, 2016 at 07:25 AM · aisendmessagesight

Alert All Enemies Inside Certain Area

I am trying to alert all enemies inside a certain area when one of them sees the player that they have to move around and try to find the player. What is the best way of doing this? I'm thinking there might be someway of doing this with sendmessage but how do I do it so only the enemies within that certain area are alerted of my presence?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by marfa4321 · Jan 01, 2016 at 07:55 AM

Hi, @L20GAMES
I'm think you can use RayCast and Trigger Collider.
Put an Trigger Collider in your certain area.
Then you check if the player in the trigger collider, you create a code to make RayCast.
While a RayCast got player gameobject, you create a code to moving all of enemies to go to the player.
But to do this, your player must have Collider Component to use Trigger Collider and Tag to use RayCast
If you have a trouble when making the code, you can tell me again

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image L20GAMES · Jan 01, 2016 at 07:58 AM 0
Share

I am a bit confused with this. I've got a thing on the enemies so if the player enters their line of sight it will alert them and they will move towards the player. I need it so if one enemy gets alerted then all the enemies within a certain area get alerted. Sorry if there were any confusion.

avatar image marfa4321 L20GAMES · Jan 01, 2016 at 08:57 AM 0
Share

Are you mean 'if player enter the certain area' or you mean 'if an enemy seen player in anyplace?' If you mean an enemy seen player in anyplace and then all enemies in certain area will get alerted, are all enemies is static or dynamic? (i mean 'are all enemies is static' is 'all enemies' not increased or decreased and 'are all enemies is dynamic' is 'all enemies' can increased or decreased) I am a bit confused too with this question. Sorry, maybe you must explain it clearly. sorry if my english is bad

avatar image L20GAMES marfa4321 · Jan 01, 2016 at 10:40 AM 0
Share

Your English isn't too bad :) I am wanting all enemies that are inside a base to be alerted when one of them sees the Player. The only way I can work out to do this is by sending a message to each individual enemy. Is there any easier way to do it.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

49 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Advanced AI sight? AI can detect you if part of you is visible to them. Is it Possible? 1 Answer

C# Enemy AI, when player is not visible i want the Enemy to chase the player for a few more seconds and then stop. 0 Answers

How to tell which trigger is detecting with OnTriggerEnter? 1 Answer

AI Raycasting 0 Answers

how to search for a random point until the condition is true? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges