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,432
Reaction score
604
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
61
Reaction score
85
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,432
Reaction score
604
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hey there everyone! My laptop broke unexpectedly recently and I lost some files I hadn't backed up . . .
Pro tip to anyone looking for advice based on existing game mechanics: a lot of people reading your request won't have played the games you're talking about. Always assume your readers won't have, and explain what the mechanic actually *does* rather than just name-dropping the game. I see this a lot.
 …So I was looking at a question someone had asked and did some related experimentation. Apparently the Jump… movement route command works like the ultimate through. Including letting you move around outside the confines of the map entirely. o_O
Jump.png
Okay so today I heard the dumbest theory I have heard in a loooooooong while. It's so stupid I just have to share... Appearantly I have learned to draw 'hot chicks' so that 'real men' get physically excited by looking at it and I can then swoop in and 'turn' them.... Wow... Just... Amazing how some brains works...
What the writer wrote: "The curtain is blue."
The readers: "There must be a hidden meaning behind this, perhaps to convey the character emotions ...".
What the writer has in mind: "The curtain is frickin' blue".

Forum statistics

Threads
115,849
Messages
1,093,392
Members
151,044
Latest member
undertides
Top