Cristiander

Veteran
Veteran
Joined
Aug 13, 2015
Messages
41
Reaction score
1
First Language
Romanian
Primarily Uses
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
 
Last edited by a moderator:

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
2,137
Reaction score
647
First Language
English
Primarily Uses
N/A
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
 
Last edited by a moderator:

Cristiander

Veteran
Veteran
Joined
Aug 13, 2015
Messages
41
Reaction score
1
First Language
Romanian
Primarily Uses
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
 
Last edited by a moderator:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,624
Reaction score
502
First Language
German
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,718
Reaction score
15,844
First Language
English
Primarily Uses
RMMV
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.
 

Cristiander

Veteran
Veteran
Joined
Aug 13, 2015
Messages
41
Reaction score
1
First Language
Romanian
Primarily Uses
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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,718
Reaction score
15,844
First Language
English
Primarily Uses
RMMV
Yes, if you have scripts that overwrite those methods, you will need to change them instead, or as well.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
That is because anti lags mostly work by having events that are not on screen to stop updating...
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
2,137
Reaction score
647
First Language
English
Primarily Uses
N/A
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 :)
 

Latest Threads

Latest Profile Posts

Unfortunately, while trying to run an app I needed (curse you, Adobe!), my laptop blacked out, so my data got wiped when I got it repaired. Stuff like facesets are saved in my drive, but my sprites now only exist as screenshots I've taken in the past :kaocry:To be fair, I'm a little relieved, since I've been feeling unsatisfied with the visual style of the character sprites, and I guess I can now revamp them?

after lot's of edits to Mike's attacks (to make it seamless with movement, no EX versions, cost 1-ups), I finally got combo skills to work. had to do a lot moving tho to get the combo list to appear where it is lol. that actually took longer than setting up the moves.
What's kind of amazing is I've been in a developmental rut for the LONGEST time but putting a music mix on of video game soundtracks and specifically hearing the VX Ace music come up and it's nostalgia of me being excited to make my first game has REALLY got me going again!
Finally finished my tiefling!
F222514F-9F32-4B97-88C3-664E8A2134C3.gif

Forum statistics

Threads
122,029
Messages
1,145,960
Members
160,291
Latest member
arnvrl
Top