Move Offscreen

I have a section in my game where the player is on a conveyor belt and is dodging incoming crates.

I had an area where the player couldn't move up or down, I made a couple of crates and set them to move down so that the player has to dodge them, but when I started nothing happened. I then found out that events don't move if they are offscreen.

I even tryed to force them to move, by having a separate event that runs the move route, but still no results.

I need to have these events move despite being offscreen. How do I go about this?

I found this script:

# Put [update] in the event's name and the move route will always update.## ~Kreadclass Game_Event < Game_Character #-------------------------------------------------------------------------- # * Determine if Near Visible Area of Screen #-------------------------------------------------------------------------- alias_method🙂krx_alfix_ge_nts?, :near_the_screen?) def near_the_screen?(dx = 12, dy = 8) # YEA compatibility if $imported && $imported["YEA-CoreEngine"] dx = dy = nil end # YEA compatibility return true if @event.name.include?('[update]') return krx_alfix_ge_nts?(dx, dy) endendbut it doesn't work...

It only updates events that have begun moving, it doesn't help start their move route if they're offscreen
Variables are your friends

To clarify. Set a second page on the event were the condition is a variable. Set it to 1 or something. Then when you need the box to move, have another event increase the variable to 1. Or you could just have the box be a parrellel process event that waits, then sets the variable to 1. If all the boxes use 1, just do this with one box

You might even be able to trigger it with a proximity script, but ive never tested it
Variables are your friends

To clarify. Set a second page on the event were the condition is a variable. Set it to 1 or something. Then when you need the box to move, have another event increase the variable to 1. Or you could just have the box be a parrellel process event that waits, then sets the variable to 1. If all the boxes use 1, just do this with one box

You might even be able to trigger it with a proximity script, but ive never tested it
That isn't diferent from what I was using. I was using a switch to determine if the boxes move or not.

I tryed what you told me but the result is the same, they don't move because they're offscreen
Strange...

Yes you are right the normal Custom Moveroute of Events doesnt Work out of Screen.

But if another Event gives the Moveroute via Set Mouveroute Command for that Event, than it will run around even if offscreen.

So iam not sure why that is not working for you?

Maybe you selected the wrong Event in the Eventcommand?

Or maybe you forgot to turn off the moveroute on the events you want to run around. If a Event has a Moveroute and when you than give it a New Moveroute

the old one will get overwritten even if it has not finished. That would happen the moment it Enters the visible Screen, so they need to be Fixed not on Custom if another Event is giving the Moveroute for them.

Thisway i made Cars running around automaticly in a big City.

My English aint the best, so i hope it Helps somehow. Difficult to explain.
You don't need a custom script for that. And if you search, you will see that this question was asked and answered (by me) very recently - within the last week.


Do a global search (control+shift+f) in the scripts for the following:

Code:
def near_the_screen?
and
Code:
def near_the_player?
One of those has two numbers, and the other has one. Just make them larger.
You don't need a custom script for that. And if you search, you will see that this question was asked and answered (by me) very recently - within the last week.

Do a global search (control+shift+f) in the scripts for the following:

def near_the_screen?and
Code:
def near_the_player?
One of those has two numbers, and the other has one. Just make them larger.
Ok, did that and it still didn't work.

Turns out the the script Antilag - by Victor that I was using kept the objects from moving

I'll try to edit that part out now
Yes, if you have scripts that overwrite those methods, you will need to change them instead, or as well.
That is because anti lags mostly work by having events that are not on screen to stop updating...
Well im switching between working on two projects and one is a five nights at freddys-ish game and those methods work for it

Anyway, glad you found the awnser 🙂

Original thread: https://forums.rpgmakerweb.com/threads/move-offscreen.44305/