so i have an event that blocks you from progressing unless you give it an item and then it moves out of the way, but my problem is that it respawns, i want it so that when you give it the item, it will stay out of your way forever, also by move out of the way i dont mean makes the event transparent or anything i mean it literally like walks out of the way
how to stop events from respawning
RPG Maker VXAce SupportSecond event command page -> move route.
Have the event move aside.
Activate switch.
Event has a second page that is empty and "through ON".
The position it moved to has its own event, first page empty and "through ON", second page has the same graphic as the first on the first page, activated by switch.
That way you ensure that the event stays in place.
Have the event move aside.
Activate switch.
Event has a second page that is empty and "through ON".
The position it moved to has its own event, first page empty and "through ON", second page has the same graphic as the first on the first page, activated by switch.
That way you ensure that the event stays in place.
Once you gave it the good item, activate a switch and make the event move out of the way.
Now set an auto event that checks if the switch is on. If it's off, simply erase the event. If the switch is on, use the "set event location" command to set the correct position of the blocking event, and then erase the auto event.
So basically use the "set event location" command.
Now set an auto event that checks if the switch is on. If it's off, simply erase the event. If the switch is on, use the "set event location" command to set the correct position of the blocking event, and then erase the auto event.
So basically use the "set event location" command.
Not advisable if the map has heavy traffic from other auto-run events/parallel processes, and in any case it may glitch out shortly when loading a savestate.
@Shiro-chan You are wrong for two reasons:
1) First of all auto-run doesn't put a heavy load on the CPU because there's only one auto-run event that runs at the same time. Only parallel-process events can put heavy loads on CPUs, and even then it depends on the content of the event, not the number of events. I could have 100 parallel events that simply change some variables value and it won't even load 1% of my cpu.
2) The "set event location" command does not put a heavy load on the cpu, so if it's lagging, it means that it's something else that's causing it. There is also not more chance to glitch out than any other process. If it's not in the correct position after you use the command, it's either because the event moved after the command, or you set a new position after the command. I have been using the "set event location" for years with no problem, and I'm well aware of CPU intensive tasks since I'm a coder, and I've coded some stuff with far heavy load on the CPU (many battle systems with complex ability systems for example).
So for OP, the "set event location" is a great solution. Although having a second event page on the event that moves it if a switch is on would work, it wouldn't be instantaneous like the set event location.
1) First of all auto-run doesn't put a heavy load on the CPU because there's only one auto-run event that runs at the same time. Only parallel-process events can put heavy loads on CPUs, and even then it depends on the content of the event, not the number of events. I could have 100 parallel events that simply change some variables value and it won't even load 1% of my cpu.
2) The "set event location" command does not put a heavy load on the cpu, so if it's lagging, it means that it's something else that's causing it. There is also not more chance to glitch out than any other process. If it's not in the correct position after you use the command, it's either because the event moved after the command, or you set a new position after the command. I have been using the "set event location" for years with no problem, and I'm well aware of CPU intensive tasks since I'm a coder, and I've coded some stuff with far heavy load on the CPU (many battle systems with complex ability systems for example).
So for OP, the "set event location" is a great solution. Although having a second event page on the event that moves it if a switch is on would work, it wouldn't be instantaneous like the set event location.
You are giving the Event the Item on Eventpage1 and let the Event go away, than you activate the Switch for the 2nd Eventpage.
2nd Eventpage contains the Graphic of the NPC and you need to give it a Autonomous Moveroute, do NOT mark repeat, turn Frequency to Highest and insert in the Moveroute as Scriptcommand: moveto(x, y) for example: moveto(5, 3).
Thatway after map reloading the Event will automaticly change Position from its origin to the new coordinates, without the player even noticing.
The way "Mushroom" described isnt sucking performance, its a clean way to do such things. I did it like that previously. Now iam trying the way i mentioned above.
BUT to add to the other Solution: dont use Autorun, use Paralell, autorun starts after the map is allready visible for a second, paralell starts earlier, and you dont want the player see the event teleporting.
2nd Eventpage contains the Graphic of the NPC and you need to give it a Autonomous Moveroute, do NOT mark repeat, turn Frequency to Highest and insert in the Moveroute as Scriptcommand: moveto(x, y) for example: moveto(5, 3).
Thatway after map reloading the Event will automaticly change Position from its origin to the new coordinates, without the player even noticing.
The way "Mushroom" described isnt sucking performance, its a clean way to do such things. I did it like that previously. Now iam trying the way i mentioned above.
BUT to add to the other Solution: dont use Autorun, use Paralell, autorun starts after the map is allready visible for a second, paralell starts earlier, and you dont want the player see the event teleporting.
that worked really well! do you know if its possible to make it so you can talk to it after its already moved?
edit: never mind i figured it out, i accidentally missed a step lol
You should look up switches and multiple event pages. You will use them a LOT in your game, so need to understand how they work.
@fluff If this has fully answered your query please Report your opening post and ask for it to be closed.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-stop-events-from-respawning.104369/