MV Event Detectors

FEATURES
Adds basic functionality to check if events are within a certain distance of the player and if the player is in 180 degree line of sight.
In addition, behaviors can be set up for events to automatically act differently when detecting and not detecting, such as guards chasing when detecting the player and returning to their start location when they lose sight of them (this uses default pathfinding code so does not do long distances well).

VERSION 1.2 – RPG Maker MV
Download Plugin file
Download Demo

Advertisements

24 thoughts on “MV Event Detectors

  1. Freezegazer says:

    Woah! It’s cool! Thank You for interesting scripts.
    I’m really a fan of You.

    Cvrtis.

  2. Galaxyglow says:

    Ah sweet! I love sneaking in games, but Yanfly’s version was incompatible with your diagonal movement plugin. When it came between the two I chose yours. With this plugin I can do both!!

  3. Black Noise says:

    Nice plugin!
    I just tried this after Yanfly’s Event Encounter Aid and Event Chase Player plugins but I couldn’t find a way to get events to wander randomly before chasing the player and yours seems to fill that gap with a bit of tweaking here and there.

    Although I really want my events to play a sound effect every time they detect the player. Perhaps you could add that feature to individual behaviors in a future update?

    Thanks.

  4. Chandler Rounsley says:

    This plugin is awesome but I’ve encountered a bit of a bug when the chasing event gets stuck. It causes the game to drop to like 1 fps. The events get stuck if I use dev commands to walk through walls, or even if a different even gets in its way while it walks back to its start position.

    I don’t know if this is an error with my version or the whole plugin but I figured I’d let you know.

    • Galv says:

      Unfortunately it uses the default RPG Maker pathfinding which I have heard drops FPS at times when used on slower machines and I have no way to test this as I don’t have a machine that can replicate it unfortunately :(

      Not sure what you mean about walking through walls thing. I would need a project setup to look at what you’ve done before I can help any.

  5. Galv says:

    Ahh, if you are testing using this plugin then I wouldn’t advise using that debug through movement. I don’t plan to look into that particular issue

    • Chandler Rounsley says:

      That’s what I figured I’d do (stop using that) but then another event blocked the path back to the start point and the fps dropped in the same way.

      • Galv says:

        As in completely blocked the path? So the event couldn’t possible walk back to the start?
        I didn’t think of that, I think you might need to design your map to make that not possible to do perhaps.

  6. Superdude says:

    Is there any way to make the LOS a straight line? i.e. The NPC is looking straight at you with nothing in the way. The 180-degree arc complicates my game a bit too much.

  7. nick says:

    Awesome plugin. I was wondering if there was a way to invert the line of sight so it spreads outwards? Currently it creates a cone that is large near the event and gets smaller as it goes further away, can this be reversed so it operates more like the line of sight in a Metal Gear Solid style game?

  8. Adam says:

    This plugin is awesome! Is there a way to make the event store its original x and y once at the start of the game or set it somewhere manually? Having trouble making events go through doors as their “original” x y changes on teleport.

    • Galv says:

      Might have to add that in, but unfortunately I am very busy at the moment and can’t look into it right now. You could try asking in a forum to see if someone else can help in the meantime :)

      • Adam says:

        Thanks. I’ve tried asking in the forum but no one seems to be willing to help. How hard would it be to fix? Would you be able to direct me to what would need changing? Or is this something that’s quite complex.

      • Galv says:

        Not sure how hard it would be, but in order to tell you how to do it, I would first need to do it myself which I cannot at this time, sorry :(

      • Adam says:

        Got it to work. What I had to do is put the following code within the very last part of your plugin. Then put a comment in the event such as . It will then use that x and y as its go to point.

        for (var i = 0; i < page.list.length; i++) {
        if (page.list[i].code == 108 && page.list[i].parameters[0].contains("<post:")) {
        var myRegex = //;
        var matches = page.list[i].parameters[0].match(myRegex);
        this._origMovement.x = matches[1]; //the first number
        this._origMovement.y = matches[2]; //the second number
        break;
        }
        };

        The only thing that it’s missing is a way to pathfind through the doors. I reckon it would work if there was a way to create an invisible path leading from door to door through the walls and black parts. I reckon if you could specify regions that it will “ignore” much like you can specify regions that block LOS in the plugin.

  9. Mike says:

    Not compatible with HIME_CustomPageConditions :(

  10. Sean says:

    Great piece of work! But will this plugin count in walls and corners blocking line of sight, such that event won’t see the player if the player is on the other side of the wall?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s