Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,384
Reaction score
1,676
First Language
English
Primarily Uses
RMMZ

 Event Detectors - Version 1.2
RPG Maker MV Plugin
Galv



Introduction
Script to add functionality for events detecting the player


Screenshot
eventDetectors_zpss8n0xb4d.jpg



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,635
Reaction score
1,457
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
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,355
Reaction score
1,955
First Language
English
Primarily Uses
RMMV
Hi, I love your plugin. It's made my game running LeTBS exactly how I wanted. However, I'm having trouble figuring out which terrain ID is what. In your demo, the jars are terrain ID: 5, but I don't understand how that's the case since the jars are on the 11th row, 1st column of the tileset...
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
944
Reaction score
5,807
First Language
Absurdism
Primarily Uses
RMMZ
Terrain ID is set by going the tilemap, clicking "Terrain Tag" and setting the tile to the number you want. It doesn't actually have any relation to the location on the tilesheet. That would be the Tile ID. :LZSwink:
 

MetalGearPearl

Villager
Member
Joined
Jun 30, 2021
Messages
13
Reaction score
2
First Language
Spanish
Primarily Uses
RMMZ

Event Detectors - Version 1.2
RPG Maker MV Plugin
Galv



Introduction
Script to add functionality for events detecting the player


Screenshot
eventDetectors_zpss8n0xb4d.jpg



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
The plugin is great, but the problem I see is that if the player is on top or to the near side, the NPC will move towards the wall and that causes the game to drop their FPS a lot
 

Latest Threads

Latest Profile Posts

7DcJlIG.png


Made a lot of progress on the tileset for the more sumptuous interior areas for the priory
I keep thinking up of new changes or improvements... Edit: Forgot to add the image Gimpwork.JPG
Hello, my nickname is Rigomor, but I am also known as Mopsikus. I work on RPG Maker games, and are currently working on a game called Peony of War.

Forum statistics

Threads
117,299
Messages
1,106,294
Members
153,480
Latest member
Varlen
Top