npc moving while player is on another map

AwesomeCool

Bratty and spoiled little sister
Veteran
Joined
Jul 20, 2013
Messages
2,862
Reaction score
1,947
First Language
English
Primarily Uses
N/A
I have been pondering this idea for a while and can't quite figure out a way to execute it.

The idea being npcs moving to different locations while the player is in another map. (good for harvest moon style games)

I can get npcs to save there locations when the player changes maps and goes back, but I need help figuring out how to get the npcs to change positions while the player is in another map.

Anybody have any ideas?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
could create some updater module that stores & updates a set of variables, then when you re-enter a map, it sets the event to the variable stored within the updater. :)
 

AwesomeCool

Bratty and spoiled little sister
Veteran
Joined
Jul 20, 2013
Messages
2,862
Reaction score
1,947
First Language
English
Primarily Uses
N/A
could create some updater module that stores & updates a set of variables, then when you re-enter a map, it sets the event to the variable stored within the updater. :)
hmmm.

So I could get the map passability and save a grid for certain maps and have them update like real maps.  I like the idea. :)
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Normally the engine will never process events outside the current map the player is in, but what you can do is either 1) save the event NPC location and have it spawn + resume from there when the map is entered again, or 2) make the event NPC randomly spawn in a specific area when re-entered. Having it in real-time is, I believe, impossible for the engine.

Some advanced AAA game engines have the ability close enough to real-time, where based on elapsed time between two different maps, event NPCs will spawn at certain distances from where you last left them when you left the map. For example if I left the map for 5 seconds and re-entered, an NPC would move 5 feet away. If I left and re-entered 15 seconds later, they would move 15 feet instead.
 
Last edited by a moderator:

supercow

Artist
Veteran
Joined
Jul 16, 2013
Messages
383
Reaction score
146
First Language
indonesia
Primarily Uses
or make 1 giant insanely big map :guffaw:
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You can use my Remember Event Position script. You can call it directly with the map and event id, and the location you want the event to be at. Next time you go to that map, the event will be at that location.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top