Autonomous Movement doesn't run/update outside the player's camera

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,642
First Language
No
Primarily Uses
N/A
Hey, I was making some mechanics involving the use of Autonomous Movement, but I have been stumbled. The Autonomous Movement doesn't run/update outside the player's camera (not even with Parallel Process). I have tried a snippet but it doesn't work (I get an error) even on a new project, which I assume is because of Ace's updates. Anti-Lag scripts has been suggested but it still doesn't run/update the Autonomous Movement when outside the player's camera.


Snippet error:




Snippet:

# Put [update] in the event’s name and the move route will always update.
#
# ~Kread


class 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)
end
end



Demo (the guard should come from the right. interact with the event above the player to walk through water):

 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I know you can set a move route for an event outside the camera and it will update, but the move route has to be set in another event (so not in the move route of the event itself). At least I've had no issues with it, though an anti-lag script might make that not work. Could you use an autorun for the entire sequence you are trying to use by chance?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
you'll need an advanced anti-lag script, and you'll need to mark the events that need to run outside the player area - of course no antilag will activate them as-is, because that would increase lag.


Please check the instructions for using the anti-lag scripts you found, and see how to mark map events as always run. Just adding an anti-lag script alone does nothing, it needs to be configured correctly.
 

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,642
First Language
No
Primarily Uses
N/A
I know you can set a move route for an event outside the camera and it will update, but the move route has to be set in another event (so not in the move route of the event itself). At least I've had no issues with it, though an anti-lag script might make that not work. Could you use an autorun for the entire sequence you are trying to use by chance?
I'm trying to do an operation while also doing the movement, so that's why it's not an actual move route. I've tried to put the route in 'Else', but it doesn't quite work haha.




you'll need an advanced anti-lag script, and you'll need to mark the events that need to run outside the player area - of course no antilag will activate them as-is, because that would increase lag.


Please check the instructions for using the anti-lag scripts you found, and see how to mark map events as always run. Just adding an anti-lag script alone does nothing, it needs to be configured correctly.
I actually marked them to always update and it doesn't work. In the demo I provided you can see I have some comments (both as a call and in the event) for the event but it still doesn't work. Beware though, the demo doesn't provide the script, it just have the comments.
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I found the bug. The snippet is off. Try posting this instead:

# Put [update] in the event’s name and the move route will always update.
#
# ~Kread


class 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)
   end
 end



The error was the ' ' was the wrong version of them (I think they used ` instead, which won't work). I'll also post an updated version of your demo here with the correct snippet included, though I did change the guards move route while experimenting so you'll need to restore it to what you want.


http://www.mediafire.com/download/j1jmluqjdro9git/1.rar
 

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,642
First Language
No
Primarily Uses
N/A
I found the bug. The snippet is off. Try posting this instead:
Amazing! It works like a charm :D


There is a little bug in the script that can be fixed easily, and it's that if you don't have Yanfly's Core Engine, it throws an error, but removing the line to check Yanfly's compatibility fixed the problem. Just something worth mentioning for by-passers.

# Put [update] in the event’s name and the move route will always update.
#
# ~Kread
 
class 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)
   return true if @event.name.include?('[update]')
   return krx_alfix_ge_nts?(dx, dy)
   end
 end
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
If you marked them and it doesn't work, then you did something wrong with the script.
 

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,642
First Language
No
Primarily Uses
N/A
If you marked them and it doesn't work, then you did something wrong with the script.
I've tried 2 scripts in the demo and they don't work. Here's a demo so you can find out for yourself. From the scripts I've seen, they only update the event page and not the Autonomous Route which is the issue I was having. Enabling the script snippet (provided in the demo) fixes the issue.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Yeah, the check for Yanfly didn't post for some silly reason, but it's correct in the demo. Use that one instead.
 

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,642
First Language
No
Primarily Uses
N/A
Disregard what I earlier said, I seem to not have the bug appear in the snippet you posted. Ugh, those ninja bugs :ninja:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,584
Latest member
Faustus2501
Top