How to check note tags of event

Status
Not open for further replies.

Disadas

Warper
Member
Joined
Mar 31, 2020
Messages
4
Reaction score
0
First Language
Spanish
Primarily Uses
N/A
Is there a way to check an note tag of an event, determine if an <tree> is present there, and if so, trigger a conditional branch?

I imagine it'll require either a script or possibly even a plugin...

I'm trying to make a pseudo AI for chopping. My problem is... If it is a tree in front of a character it trigger an animation and get logs... But I need a script call for check events that has the <tree> note tag... so it only get "logs" (add +1 to a variable) if it is true.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,087
Reaction score
634
First Language
Poland
Primarily Uses
RMMV
Yes,
$dataMap.events[eventId].meta['your_notetag']

Code:
if ($dataMap.events[eventId].meta['your_notetag'] === 'blabla'){
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
}
 

Disadas

Warper
Member
Joined
Mar 31, 2020
Messages
4
Reaction score
0
First Language
Spanish
Primarily Uses
N/A
Yes,
$dataMap.events[eventId].meta['your_notetag']

Code:
if ($dataMap.events[eventId].meta['your_notetag'] === 'blabla'){
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
}
Thanks! \(>w<)/
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,827
Reaction score
14,980
First Language
English
Primarily Uses
RMMV
If your note tag is just <tree> I think you can also just do

Code:
if ($dataMap.events[eventId].meta['tree']) { do stuff }
 

Prellmarc

Squire
Member
Joined
Sep 23, 2014
Messages
13
Reaction score
1
First Language
German
Primarily Uses
RMVXA
Even of this thread is an old one, I might ask something

What would it look like if I wanted to check an events note tag on the event next to me? 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?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,827
Reaction score
14,980
First Language
English
Primarily Uses
RMMV

@Prellmarc, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.



Your question is not the same as the OP's so you are also hijacking. Please start your own thread for your question, and post a link to this one if you think it'll be useful.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

I'm familiar with MZ thanks to jam now. I say it's a better working and looking MV. Lots of plugins too and FOSSIL helps alot. It's not bad.
Some more progress <3 and in most important news:
ALPACARAPTOR SPRITE! (not animated yet, though :( )
h4u90Sz.png
Caz
At the risk of giving myself even more work to do, I kinda wanna redraw the faces of the MV RTP to be a little less.. uhhhhh..

mv-redraw.png
Hmm...you'd think in this day and age, what with Japanese Schoolgirls frequenting anime, JRGs and whatever else...that someone might have made some gym clothes for the generator. You know, the ones with the short bloomers.
finished the draft of some of this dude's motions!

mc0xoB4.gif


gonna work on the drafts of the other 3 now before i put detail, need to position these rather tall sprites well on the field

waiting for the term to end so i can get more time w this :kaodes:

Forum statistics

Threads
113,641
Messages
1,076,387
Members
147,663
Latest member
kiliharaki
Top