AmVa

Villager
Member
Joined
Jul 6, 2022
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMMV
I'm using Yanfly's self variables plugin and was wondering about something

I have 2 identical action button events ("trees") with this setup:

page 1
◆Control Variables:#0012 Self Var Tree X = Map X of This Event
◆Control Variables:#0013 Self Var Tree Y = Map Y of This Event
◆Control Variables:#0018 CurrentTreeX = Self Var Tree X
◆Control Variables:#0018 CurrentTreeX = Self Var Tree Y
◆Control Variables:#0006 FireX = Map X of Fire
◆Control Variables:#0007 FireY = Map Y of Fire
◆Set Event Location:Fire, ({CurrentTreeX},{CurrentTreeY})
page 2
◆If:FireX = CurrentTreeX
◆If:FireY = CurrentTreeY
tree is burning etc...

I only want the latest tree that I clicked on to burn, but both of them are burning and I'm confused why?
"CurrentTreeXY" should carry the coordinates of the second tree, therefore for the first tree to burn the conditions were not met. What am I doing wrong?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,942
Reaction score
3,139
First Language
English
Primarily Uses
RMMV
Can you post actual screenshots of the events? What are your conditions in the upper left area for page 2?

FireX/Y and CurrentTreeX/Y are both not self variables, they're used globally. So if those are equal to each other, and you don't have any other conditions specific to an event to stop it, then those conditionals will be true for any event comparing them.

There's nothing in your page 2 burning bit that's looking at the self variables or the map coordinates of that specific event, based on what you typed.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,985
Reaction score
2,343
First Language
Dutch
Primarily Uses
RMMV
another notice on your typed text ,is that variable 18 uses
both CurrentTreeX, and not X/Y, but I agree with ATT_Turan, you
should provide screenshots to see what went wrong.
 

AmVa

Villager
Member
Joined
Jul 6, 2022
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMMV
FireX/Y and CurrentTreeX/Y are both not self variables, they're used globally. So if those are equal to each other, and you don't have any other conditions specific to an event to stop it, then those conditionals will be true for any event comparing them.
True, I see now that wouldn't work

However, the same issue happens even with this setup instead:

◆If:FireX = Self Var Tree X
◆If:FireY = Self Var Tree Y

Because even though each one has different values, the condition is still true for each tree individually...

There's nothing in your page 2 burning bit that's looking at the self variables or the map coordinates of that specific event
Indeed, I don't want to make them dependant on specific values because that would be a ton of work... I'm planning to clone the tree event many many times. in other words, I'm looking for a shortcut but I see the difficulty with it.

Is there no way to set a condition that would practically be this?

◆If:FireX = Map X of this event
◆If:FireY = Map Y of this event
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,942
Reaction score
3,139
First Language
English
Primarily Uses
RMMV
Of course, you simply have to do it on the same event page as where you set a variable equal to the event's coordinates.

If you post the screenshots that were requested, you can probably get more specific help.
 

AmVa

Villager
Member
Joined
Jul 6, 2022
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMMV
Thanks a lot!
I figured it out eventually, my mistake was that I set the XY variables of Fire in the wrong place lol and the self var plugin was off too
 

Latest Threads

Latest Posts

Latest Profile Posts

I just got all of my wisdom teeth out today, thankfully I have the rest of the week off.
Man I am learning I am bad at naming armor lmao.
The game's opening, now fully polished! :LZScheeze:





Aaand, here's me working on it in today's "Game Making Every Day" video! :LZSooo:

Hello! Can anyone help me? I followed making cooking tutorial for RPG Maker MV. But for some reason buff state that food gives doesn't work in overworld. It disappears. What am I supposed to do?
A shotgun is not a rifle. Huh.

Forum statistics

Threads
124,406
Messages
1,163,380
Members
163,201
Latest member
YoBa
Top