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,715
Reaction score
15,839
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,715
Reaction score
15,839
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

Бас Лого.png
Reflections on the topic of choosing the path of the main character )
Now I want to change back to a Class system again xD Around and around we go!
Progress on the title graphic:
titledemo3.png
titledemo2.png
I'm still looking at the best way to do the subtitle.
I haven't touched the forum or my project for months because a few people were being a little aggressive when I asked for help
its_a_random_world.jpg
Well after half a year of health problems (that aren't as bad as before), and playing with UE4 & 5... I realized I should finish this project before working on something else. So I decided to upgrade my randomizer. And really just focus on compromising wherever I can to finish the project sooner rather than later. :kaoswt:

Forum statistics

Threads
121,894
Messages
1,144,988
Members
160,150
Latest member
TeeMcTee
Top