How do I create a noise radius and a response?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)