Galv's Event Detectors

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,186
Reaction score
1,144
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



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
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,615
Reaction score
1,417
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:

ziacer

Villager
Member
Joined
Oct 28, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi,

So i was trying this out and it gives me
Cannot read property "6" of undefined
whenever I try to run it.
 

Unknown2001

Veteran
Veteran
Joined
Jul 28, 2019
Messages
31
Reaction score
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?
 

Unknown2001

Veteran
Veteran
Joined
Jul 28, 2019
Messages
31
Reaction score
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

In the strangest turn of events, my animations now live in the characters folder, and my character images now live in the pictures folder. It's a complicated world, but weirdly a more resource efficient one. :LZSexcite:
Did you know that we use robotic spy animals to learn about how different species behave in the wild? We're only a step away from robotic spy humans, and then Terminator. :p
Not being able to do a commission/request after all and having to give back the money is so heartbreaking.

Sometimes I'm just way too eager to help people out and suddenly find myself in a very deep hole because I'm not gonna be able to finish it. I really hope I don't come across as unprofessional to these people and in general. =n="
Learning Action Sequences!

Forum statistics

Threads
98,046
Messages
948,824
Members
129,310
Latest member
eillajones309
Top