I'm using Visu's event and movement core and I have been hitting a wall. See Ive been using self variables for my flowers that grow independant from eachother, and the way i timed when each flower grow was using a event that told every flower event on that map to grow after a wait command using the plugin command to adjust self variables of specific events. But now I want to use the plugin so that the player can actually buy new flowers the grow and i can't connect the same method for map based flowers for spawnable/bought flowers. So does anyone know a way I can make flower grow without simply making the events run parrel (since i wish for the player to actually be able click flowers to pluck them, which is why the system involving them is there in the first place] Heres photos to better explain
MZ VisuStella's Event and Movement Core, Spawning and Self Variables
Javascript/Plugin SupportYou can always get all your spawned events on the map with:
And then you can manipulate them all or just ones that have notetags.
Or you can store the ids when you spawn the events with
And then manipulate those event ids on the map.
But if you're making a farming game, there's dedicated plugins for that too.
$gameMap._spawnedEventsAnd then you can manipulate them all or just ones that have notetags.
Or you can store the ids when you spawn the events with
$gameMap.lastSpawnedEventID()And then manipulate those event ids on the map.
But if you're making a farming game, there's dedicated plugins for that too.
I DID NOT THINK OF A FARMING PLUGIN TIL NOW!!! Thanks for the heads up, and i'll give those methods a try, though I am a bit confused still lol. Never been the greatest at coding
Though to be clear, this isn't a farming game im making, moreso that the flowers are bought, placed somewhere on the map, and gros so the player can pluck them to be used as feed for their pets
If you want one parallel event to increase self variable for all spawns on map, it's something like below.
The code for the cutoff event id line is:
EDIT: Though I haven't checked how VS treats that array if you keep despawning and respawning stuff. But anyway that's an idea. You can also make a game variable an array yourself where you push the event id when you spawn an event and use that.
The code for the cutoff event id line is:
$gameMap._spawnedEvents[$gameVariables.value(11)].eventId()◆Control Variables:#0010 = $gameMap._spawnedEvents.length◆Control Variables:#0011 = 0◆If:Script:$gameMap._spawnedEvents.length > 0 ◆Loop ◆Plugin Command:VisuMZ_1_EventsMoveCore, Self Variable: Variable ID : :Map ID = 0 : :Event ID = $gameMap._spawnedEvents[$gameVariables.value(11)… : :Variable ID = 7 : :- = : :Operation = + : :- = : :Value = 1 ◆Control Variables:#0011 += 1 ◆If:#0011 ≥ #0010 ◆Break Loop ◆ :End ◆ :Repeat Above ◆:End◆Wait:30 framesEDIT: Though I haven't checked how VS treats that array if you keep despawning and respawning stuff. But anyway that's an idea. You can also make a game variable an array yourself where you push the event id when you spawn an event and use that.
Original thread: https://forums.rpgmakerweb.com/threads/visustellas-event-and-movement-core-spawning-and-self-variables.183077/