Reading an Events Comments

nathanlink169

Game Dev by Career, no idea what I'm doing
Veteran
Joined
Aug 15, 2013
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
Hi all,

This is a feature I've seen in previous RPG Makers, and am not certain if it's possible with MV.

Long story short: I have an event. That event has comments in it that I'm trying to read. These comments will be used to determine certain behaviour of my script.

Long story not-quite-as-short-but-still-short: I'm working on a Vision Cone script. Certain NPC's will need to have Vision Cones, and certain NPC's will not need them. I would ideally like to use comments to set these values up. The reason I would like to use comments (rather than the Note section) is in case the current Active Event Page changes, I would also like the settings to change.

Is it possible to read comments from the current events page in Javascript code?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
485
Reaction score
190
First Language
thai
Primarily Uses
RMMV
try digin on this
sorry that I can only provide sample
I myself still learn the basic
and don't touch the comment reading yet...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,137
Reaction score
12,410
First Language
English
Primarily Uses
RMMV
Take a look at what I did here:


You just have to find someone who has a plugin that uses event comments, and see how they handled it. I think it's a good approach to search for them at the time the event page changes, rather than at the time you want to check, because that's the only time the info is going to change, and doing it with each check could lead to performance issues, especially if it's a long event.
 

nathanlink169

Game Dev by Career, no idea what I'm doing
Veteran
Joined
Aug 15, 2013
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
Take a look at what I did here:


You just have to find someone who has a plugin that uses event comments, and see how they handled it. I think it's a good approach to search for them at the time the event page changes, rather than at the time you want to check, because that's the only time the info is going to change, and doing it with each check could lead to performance issues, especially if it's a long event.
Thanks Shaz, that was exactly what I was looking for. I did have a bit of a peek around for script that use event comments, but they don't tend to be advertised by the fact that they use comments, moreso their behaviour, so they were difficult to find. I appreciate you pointing me in the right direction!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,865
Messages
947,458
Members
129,089
Latest member
candutekno
Top