Event note tag check next to player

Prellmarc

Squire
Member
Joined
Sep 23, 2014
Messages
13
Reaction score
1
First Language
German
Primarily Uses
RMVXA
What would it look like if I wanted to check an events note tag on the event next to actor? So if a <tree> is on tile next to actor, and I use an water item or skill to let the tree react to it?

I made a common event to check if ANY event is next to player and it worked so far, file is attached.(credit goes to Andar, he helped a lot). Now as said I want to check for certain events through meta data
 

Attachments

  • 4.png
    4.png
    85.6 KB · Views: 6

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,888
Reaction score
1,364
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!
You can use a script call to check if the event has the note:
$gameMap.event(eventId).event().note.includes('<tree>')
It will return true if the event has this note.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,385
Reaction score
8,099
First Language
German
Primarily Uses
RMMV
if you want that specific notetag, you would have to write a plugin with a regex for checking the notes, because the notes themselves do nothing.

If the exact notetag doesn't matter however, you could use MV's build-in meta function.
please go to the MV help documentation, plugin specification and read about the metadata format.

using that specification to something like <name:tree> you could then check object.meta.name==='tree';
you'll have to replace object with the script code for the event (including its ID) however, and I don't know that code.

EDIT: Ninja'd
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,449
Reaction score
698
First Language
indonesian
Hi!
You can use a script call to check if the event has the note:
$gameMap.event(eventId).event().note.includes('<tree>')
It will return true if the event has this note.
just for clarification to @Prellmarc ... the note here is the "Note" box that put beside the "Name" box in the event editor...


and NOT the one added at the event page using comment event command...

this means the whole event only can have one type of notetags... not different note each event page (which can be done if using comment tag)... this means if you want tree event that in first page (seed phase) use watering can... then second page (grown tree phase) use axe... you cannot do that because you need to use comment tag for it to be unique each page...
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,662
Reaction score
1,380
First Language
Dutch
Primarily Uses
RMMV
As filling up to @Eliaquim and @estriole if you want to use the notebox to check,
you can also best use "selfswitches" to it:

if SS x = OFF
water tree
SS x = ON
else
SS y = ON
end
if SS y = ON
want to chop do tree?
yes/no choices
(SS y = OFF)
else
this tree is already chooped
end

maybe 2nd page to reset it after x time.
but you can have more control over this as well.

there might be other methodes as well, but this can be the included
if it's a tree, or plant or rock etc =)
 

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png

Forum statistics

Threads
110,660
Messages
1,055,028
Members
143,786
Latest member
Avigayil
Top