Is it possible for character/object goes off map & loops back from the other side without using loop map?

XENVITA

https://xenvita.carrd.co/
Member
Joined
Apr 10, 2020
Messages
13
Reaction score
1
First Language
Chinese
Primarily Uses
RMVX
It was a bad choice of words on my end, I apologize. What I meant is that anything that belongs to the Game_Character class, and events belong to that class as well, can only move withing the boundaries of the map. Depending on how you are using it, you might or might not use a simple sprite (or a picture) instead of an event. It is more complicated and requires a bit of planning, but it can be done and also ensures a smooth movement and an equally smooth transition from one part of the map to the other.

However, before telling you how to do it, I would like to know how you are going to use it. It might not be worth the effort.
Oh, does it happen to be a bit difficult to manage to make something like that? I mainly just wish for this ''character'' vehicle to transition the other side of the map smoothly.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
I mainly just wish for this ''character'' vehicle to transition the other side of the map smoothly.
I understood that, what I mean is that, depending on how the player is supposed to interact with this event, you might have to move it differently.
There are many possibilities, and a few of them have already been mentioned by other users. However, in the end, everything depends on the type of interaction that this event has with the surrounding environment.

The easiest thing is definitely that of moving it as a character (an event in this situation) and a possible solution would be that of performing a block transfer from the real image bitmap to the event bitmap. This is something relatively easy to do, but it requires a bit of coding and a certain degree of knowledge of the built-in methods of RGSS3, including those of classes that are documented in the help file and not present in the script editor.

If you do not want to code that, you can pick a different solution. There is no such a thing as "perfect solution" that works in every situation. Each solution is meant to solve a particular problem, and which solution you should pick depends exactly on what kind of problem you are trying to solve.

Here are a few examples of different situations requiring such an event to move to one edge of the map to the other.
  1. The player can look at a street and military vehicles are passing by. The said street is not accessible and the vehicles are simply there for the sake of giving out the feeling of a militarized zone, no interaction is possible between the player and those vehicles.

  2. The player has to board a train in a station, the arriving station and the departing station are, in reality, the same map, just a simple variable tells you where you are and where you have to be transferred to once you leave the map. For this purpose, the player can board the train and, to give out the vibe of leaving a station and entering a new one, the train has to leave on one side of the map and then go back from the other side. Interaction with the train is possible through the midpoint, where the entrance is located. The player can enter the train by clicking it and selecting a destination.

  3. The vehicle is patrolling a certain path and simply moves to the other side of the map when reaching either end, when the player tries to cross that path, the vehicle starts chasing the player and, whenever the vehicle sprite makes contact with the player's, a battle starts. In this case the whole sprite counts as a hit-box.
As you can see, I have already mentioned three situations where the vehicle (still an event) has to move from one end of the map to the other, but all of those situations have different kinds of interaction between the player and the vehicle.
 

hinola

Veteran
Veteran
Joined
Jun 27, 2015
Messages
58
Reaction score
84
First Language
Français
Primarily Uses
RMVXA
What's wrong with the loop map?

If it's the camera that doesn't stop on map edge, why not ask for a script that keep the same camera function on a looped map ?

You can keep the smooth passage from right to left of the map, without picture.
It would work for events, player, vehicles ...
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
If it's the camera that doesn't stop on map edge, why not ask for a script that keep the same camera function on a looped map?
As far as I could tell the OP only needs it for a single event. In the same way I would not recommend buying a whole truck just because you have to move once, I do not recommend shifting the scope to looped maps.

I am not saying that it is not going to work, it probably will, but should anything go wrong, shifting the scope from the event to the script means adding hundreds SLOC to maintain for something that could be achieved with 20-30 lines.

Not only that, it also means that you have something that is supposed to work on a single map potentially add troubles in every map, which means more trouble in the long run.

As suggested in many tutorials (the one in my signature is a good example of that), the right amount of scripts you should add to your project is the lowest possible amount that still allows you to achieve what you need.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,234
Members
137,608
Latest member
Arm9
Top