What the title says.
But let me stop you right there. I ain't a newbie. I know about the self-switch and the new page technique. This isn't for a cutscene.
I'm using a spawner plugin that lets the player spawn events. The events spawned are set to parallel process because they have to do their own things separate from the player. However, I only need them to run once per map entry. I need the event to run once then stop running as soon as it finishes its commands because as I understand it, it keeps on looping and it's causing severe lag. But I can't permanently turn it off either with a self-switch because it needs to be able to run again when the player next enters the map.
Thanks in advance!
Usually people use erase event for that, as that erases the event from memory until the map is loaded again (as in, when you return to the map).
Ah, I haven't tried that yet. I feared it would erase even the graphic from the map(is that correct)? Will it make the event disappear too or will it just stop running?
I'm not sure i understood what you want to do here.
When you say "it needs to be able to run again", do you mean from the new location from a first move (or more) or from where it is at the first enter on the map?
In any case i think you will need variables for the coordinates of your event. Changing after every move. And you still need to put a false switch to end the parallel process. You only need the switch to be set on true when you enter the map (in every teleportations' event).
you need to give us more info and possibly post screenshots of the event, because yes, erase event will delete the entire event including its sprite.
Most probably you'll need an entirely different structure, and we need to know what exactly you're trying to do before we can help you.
It's a plant/crop that runs a lot of script calls to calculate its age, health, and whether it should grow or not (and changing its image too based on its age) based on a time system. It manipulates self variables specific to itself which is why it's a parallel process event. I can't use erase event because that will erase the plant off the map too, apparently.
Since it's simply calculating its age and whether or not it should change its graphic to display its growth, I only need the calculations to run once every time the player enters the map. Because even just 8 plants rerunning calculations over and over in parallel is causing lag. But I don't need the event to be permanently turned off. For instance, should the player enter the map again the next day, the plant will need to run calculations again.
EDIT:
I could probably think of a solution myself if I play around with the functions of the Orange Time System (the one I'm using), my question is basically if there is a simple plugin-less method that I've somehow missed in all my years of RM-ing to make a parallel event run only once(that isn't Erase Event) and doesn't permanently turn it off (like activating a self-switch and locking the event to a blank page).
yes, you'll need a different structure.
make two events, one for the control and one for the plant.
The control event should have no image itself and erase itself after the single run, the plant event would only be changed remotely by that control event and stay.
This way, you can even combine all that calculations for multiple plants into one controlling event, and use the content on the plant event with action button trigger for some interactions between player and plant.
But you can't stop an parallel process without either switching to a different page (which would have a different sprite anyway) or erasing the entire event - that is simply not possible without a deep rewrite of the entire engine (which would cause more problems and compatibility isuues anyway)
The problem is, it doesn't need to be parallel. Make one master event which does this calculation for ALL the plants on the map. Then you can use erase event as the master event doesn't need to show anything, and the plants affected will still be on the screen as they are not parallel now.
One, use global switches instead of self switches - probably not feasible with the number of events needed.
Two, trigger the self switches externally. There are some plugins for that around and I've even seen a script command that could do that around, removing the need for a plugin.
I've thought about your suggestions of making a master calculator event before. The problem is, since the plants are spawned (by Galv's Event Spawner), it's hard to refer to the plants by their coordinates or eventIds, and downright impossible to loop through all the plants in the map (through eventing, at least). I can manipulate their selfvariables outside their events, but I'm going to need their eventIds. The only solution was to have each plant calculate for itself.
Anyway, my question basically has an answer now, there is no simple method to stop a parallel process. I guess I'll have to figure out a more complicated solution on my own. Thanks for the help!
please give a link to the plugin.
There should be a way to get the ID from the command to clone/spawn the event, and then it might be able to get that info into the master controller.
That said, it depends a lot of what you want to calculate and change on the event with the controller - which means we cannot help you anymore unless you provide us with screenshots of what that event you want to spawn does exactly.
There are three options left in your case: you either completely restructure the plant event using multiple pages for changes (which depends on exactly what you want to change and how, and has several limits), you requesting a specific plant plugin (if your wishes are too complex) or you trashing and simplyfying the idea infavor for simpler plants.
EDIT: or better, make a new topic for analysing the plant event behaviour as it would no longer have anything to do with the original question of this topic, so according to your ast post I'm also closing this
Thread closed IgnoreMe