Galv's Event Detectors

Discussion in 'JS Plugin Releases (RMMV)' started by Galv, Sep 8, 2016.

    Tags:
  1. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A

     Event Detectors - Version 1.2
    RPG Maker MV Plugin
    Galv



    Introduction
    Script to add functionality for events detecting the player


    Screenshot
    [​IMG]


    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. Use that behavior carefully.


    How to Use
    - Copy the "GALV_EventDetectors.js" file into your project's /js/plugins/ folder.
    - Activate plugin using the 'Plugin Manager'
    - Read the help file and examine the demo to learn how it works.


    Plugin
    Get it here


    Credit and Thanks
    - Galv


    Terms
    Free to use in any RPG Maker MV project including commercial. Please credit "Galv". :)


    Updates


    2016-08-21 - Version 1.2 - fixes to 'non detected' frequency
    2016-08-20 - Version 1.1 - fixed bug when no terrain or regions specified
    2016-08-01 - Version 1.0 - release
     
    #1
    caethyril, KaYsEr, Jonforum and 2 others like this.
  2. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,585
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    Very nice, its work very fine tanks you @Galv


    I replace YEP Event Chase Player, by your, because the other cause conflict with your diagonal plugin.


    Suggestion:


    -Add play sound when detect


    -possibility to use variable (not only fix number) for speed, frequency, detection ( ex: if player have item or status..., this change a the speed  or other Behaviors dynamically :)


    tanks
     
    Last edited by a moderator: Oct 10, 2016
    #2
  3. ziacer

    ziacer Villager Member

    Messages:
    16
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi,

    So i was trying this out and it gives me
    whenever I try to run it.
     
    #3
  4. Unknown2001

    Unknown2001 Veteran Veteran

    Messages:
    31
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hello every one I am new and struggling with this pluggin
    I cannot understand this section in the help text


    ----------------------------------------------------------------------------
    Conditional Branch SCRIPT
    ----------------------------------------------------------------------------
    You can use the below script call to check if an event can detect the player
    at the time the conditional branch is called. (Yes this can be used in a
    parallel process event if required)

    Galv.DETECT.event(id,dist,los) // id = event ID that is a detector
    // dist = tile distance from player
    // los = true or false for line of sight

    This will return true if the player is in distance range of the event and
    if los is true, it will also check if player is in line of sight to it.
    ----------------------------------------------------------------------------

    I have a guard character event walking up and down
    I am trying to trigger some show text
    inside their event I have made a conditional branch with option 4, then script option
    inside that script option I have tried typing:

    Galv.DETECT.event(guard,6,true)
    also Galv.DETECT.event(event_id,6,true)
    also Galv.DETECT.event(@event_id,6,true)

    I am using rpg maker mv
    do I have to set the guards event to player touch, or parallel or even create this in an outside event?
     
    #4
  5. Unknown2001

    Unknown2001 Veteran Veteran

    Messages:
    31
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hello internet friends
    this sounds like a helpful pluggin but I am still learning it
    I cannot understand this section in the help text


    ----------------------------------------------------------------------------
    Conditional Branch SCRIPT
    ----------------------------------------------------------------------------
    You can use the below script call to check if an event can detect the player
    at the time the conditional branch is called. (Yes this can be used in a
    parallel process event if required)

    Galv.DETECT.event(id,dist,los) // id = event ID that is a detector
    // dist = tile distance from player
    // los = true or false for line of sight

    This will return true if the player is in distance range of the event and
    if los is true, it will also check if player is in line of sight to it.
    ----------------------------------------------------------------------------

    I have a guard character event walking up and down
    I am trying to trigger some show text
    inside their event I have made a conditional branch with option 4, then script option
    inside that script option I have tried typing:

    Galv.DETECT.event(guard,6,true)
    also Galv.DETECT.event(event_id,6,true)
    also Galv.DETECT.event(@event_id,6,true)

    what do I type in the script section of the conditional branch
     
    #5

Share This Page