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?
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.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
Posts: 642
Reputation: 9,864

Post » Thu Mar 19, 2015 12:02 am

Posts: 12
Reputation: 230

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests