How do I create a noise radius and a response?

Get help using Construct 2

Post » Wed Mar 18, 2015 10:43 pm

I want to make a noise radius and a reaction to that.

For example if my Player shoots I want to set up a noise radius and if the Monster is in that radius it reacts because it hears the noise.

Is there a tutorial how to do that?
B
4
Posts: 12
Reputation: 230

Post » Wed Mar 18, 2015 10:55 pm

I can think of a couple of easy ways to do this... none of which use the audio events.

One - Make an instance variable in your enemies called something like "DetectedPlayer" set to no by default and whenever your fire a weapon call a function that simply scans for enemies within range using pixel distance or other method and then set them to yes/detected and run their go kill player AI event.

Two - poor mans way...(capx provided) Make an invisible cube/rectange/circle.. etc called RifleRadius... ShotgunRadius.. etc.. and when a gun is fired spawn the invisible sprite radius thingy on your players gun fire image point and use an On-overlap event with your enemies it sets them to kill player mode and then deletes itself.
You do not have the required permissions to view the files attached to this post.
B
47
S
11
G
6
Posts: 560
Reputation: 7,090

Post » Thu Mar 19, 2015 12:02 am

Thanks.
B
4
Posts: 12
Reputation: 230


Return to How do I....?

Who is online

Users browsing this forum: oddreal and 9 guests