How to make events move before they are seen

I have a guarded lock-up in my game which is patrolled by enemies. If you get too close, they attack you.

The problem I'm having is that when the first guard comes into view on the screen, he starts moving in his set move route (until he spots you). However, there are other guards who patrol the same route – for the sake of simplicity, let's say there are 4 guards, spaced out, who each have the same move route along a series of corridors. The other guards remain in their starting position until they come into the field of view of the player, which means they are no longer spaced out in the same way as at the beginning and start bunching up, giving the player large gaps between guards which I don't want.

Is there a way to set the events so that they all start moving as soon as the player enters the map, instead of just when they come into view?

Appreciate any ideas you might have!
Would putting the route in Custom work? That functions like a parallel process.
That's what I have.
Instead of putting the move route in custom, try to create a parallel process event that does a Set Move Route for each of the guards, and then erases itself.

I don't really know if that'll solve your problem, but the parallel process WILL run even though the player isn't near - whether the events actually move is what I'm not sure about. Let us know if it works.
On ACE all events run all the time. You might have an anti-lag script which is stopping off screen events from moving. Check for those.
There is actually a method in Game_Event that restricts the movement of events that are outside the visible area.

Here is the method:

Code:
  def update_self_movement
    if near_the_screen? && @stop_count > stop_count_threshold
      case @move_type
      when 1;  move_type_random
      when 2;  move_type_toward_player
      when 3;  move_type_custom
      end
    end
  end

So, if can modify that near_the_screen? to return always true for some events, that should be good?

I worked a code that might give you a way around this:

Edit: Snippet deleted, was buggy even if no Falcao.
Thanks everyone for all your responses!

@Shaz I tried making Parallel Processes as you suggested, but the same thing happens.
@bgillisp I'm running an ABS system (Falcoa), so there is an anti-lag built into that, which may be the cause. If so, there's not much I can do about it. 🙁
@GGZiron Thanks for the script – I really appreciate the effort. Unfortunately, it doesn't solve the problem. Just to confirm, the comment <always move> should go in the event page at the top, right? Not in the event name.

I might just have to ditch the idea of the patrolling guards, unless anyone can think of something else.
Does the ABS system have any documentation about overriding the anti-lag for specific events?
@GGZiron Thanks for the script – I really appreciate the effort. Unfortunately, it doesn't solve the problem. Just to confirm, the comment <always move> should go in the event page at the top, right? Not in the event name.
Not first page, but the active page. That was the idea, at least. Realised I missed some stuffs like updating when active page changes, for which I am sorry.

Although it worked for me when is in first page(which was the active one).
@Shaz I don't think it has any override, as far as I'm aware.

@GGZiron I think it must be a compatibility thing then.
Try with this:
Spoiler
Code:
class Game_Event

  alias_method(:ggz_initialize_original10424324, :initialize)
  alias_method(:ggz_near_the_screen110424324, :near_the_screen?)
  alias_method(:refresh110424324, :refresh)
  alias_method(:update_on_screen_event110424324, :update_on_screen_event)

  def initialize(*args)
    ggz_initialize_original10424324(*args)
    @ggz_always_move = false
  end

  def refresh(*args)
    refresh110424324(*args)
    return if self.list.nil?
    if self.list[0].code == 108 && self.list[0].parameters[0]=~/<always move>/
      ggz_set_always_move(true)
    else
      ggz_set_always_move(false)
    end
  end

  def ggz_set_always_move(bool)
    @ggz_always_move = bool
  end

  def update_on_screen_event(*args)
    return @allow_update = true if @ggz_always_move
    update_on_screen_event110424324(*args)
  end

  def near_the_screen?(*args)
    @ggz_always_move ? true : ggz_near_the_screen110424324(*args)
  end

end
Works only for Falcao Pearl ABS Liquid v3 (should work, I mean, worked to my test).

And my upper snippet is buggy even without Falcao, sorry for which.


You need to add that code in your materials, after Falcao's antilag script (or after all his scripts).
Then you will need to write comment at the beginning of the events you want to move even when far away, in their active page, in first line: <always move>
@GGZiron Still no luck. I actually have 2 areas where I need a similar effect. One is where the guards are monsters (with the <enemy> tag) and another where they are just events that move independently.

I tried it with both, thinking that it may be to do with how Falcoa handles enemy events, but I have the same issue with both types. If it works for you and not for me, then I can only assume there's some other script conflicts.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-events-move-before-they-are-seen.125475/