Hello all
I want to make a farm sim and I am using Yanfly
self Switch & Variable
link here
Event Copier
link here
Event Morpher
link here.
My crop system works as follows:
Page 1

When the seed has been planted the tile turns into this event and does two things on Autorun
1.Sets variable 21 Self Var Alpha to 1 (this is for testing purposes)
2.Turns self swith A On.
Page 2

After Page 1 is done doing its job we move to page 2 and wait for player to press the tile
the check is done in the following way:
1.Check if switch Equipped_WateringCan is ON ( this is a switch that is turned on and off by another common event)
If No: nothing happens
If Yes: Check if the player has "water" inside the can (Variable Uses Watering Can)
If No: play Show Balloon Icon ( a self made icon showing no water in watering can)
If Yes:
1.Both Variable 21 Self Var Alpha (from page 1) and Variable 11 Uses Watering Can are decreased by 1
2.A common event that checks if the watering can still has water is run (Not important)
3.A check to see if Variable 21 is equal to 0 in order to see if the tile can advance to the next crop level
If Yes:
1.(using another yanfly plugin) the event is morphed into the next stage
2.using the Exit Event Processing in order to stop the Self Switch B from turning ON
4.If the code does not enter into the IF in point number 3 then Self Switch B is turned ON
and we move to Page 3 where all that changes is just the Image showing a wet tile.
Ive made a common event to take care of the part that when it rains variable 21 Self Var Alpha will be decreased by 1 and also the Self Switch B will be turned ON

Plugin Command : SelfVariable Map 1, Event 13, Variable 21 to value - 1
If you'd look at the first two pictures you will see the event ID is 4 while in the command it says 13
this is because of the Event Copier from Yanfly
Script : $gameSelfSwitches.setValue([ 1, 13, "B"], true)
Same as the plugin command but this time its a script and its for the SelfSwitch
and now for my problem and question ( finally)
I want this Common Event to also check if Variable 21 inside Event 13 on Map 1 is equal to 0
and if Yes run the following script:
Yanfly.MorphEvent(this.eventId(), 4, 5, true)
I don't have knowledge on how to structure the code so id be grateful if someone could write it for me
thank you all for taking the time reading this.