Enemies not approaching player when class is changed.

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
I'm using a bit of a workaround method to pull off a Final Fantasy 1-esque system where you start the game and choose your four classes. Here's a script for one of the class selections:



For sake of clarification, here's a rough idea of what this script does:



In the top screenshot, you see a sword, 4 characters, 4 fountains, and a small sphere which I've crudely circled in red. The sphere is the player at the very beginning, before they've made any choices. Their choices are reflected in the fountain. The bottom screenshot is a prime example here, I've decided that I want a party of 4 of the same class, and it is reflected in the crude green circled actors. That is to be my party, a visual indicator of what I've decided upon.

Notice how the sphere changed as well. The sphere was merely a placeholder, and instead now acts as a reflection of the party member in slot 1. This works fine.

When all is said and done, the player speaks with the sword to begin their journey. The script of this is very simple:



Basically, the sword checks to see if you actually filled all 4 slots. If you haven't, it will say you need to, if you have, it will ask you if you're ready, when you are, it cues some dialogue, some name changes, and ultimately begins the game.

Something happens between then and when the game starts that makes it so enemies will not follow you on the map:



Of course, the process of this is extremely simple. NPC has move route to move toward player, upon collision, enter a battle, upon victory, self switch which makes the NPC transparent for a period of time. Easy.

If I set my Player Start Position outside of the intro screen (the area where you select classes), these work as intended. They will chase me down, follow me, collide with me, and ultimately fight with me. SOMETHING happens in the class change process which breaks them, and I don't know what it is.

Any help would be appreciated.

I've tried setting their autonomous movement type to approach. There's no different between that and Custom -> Move Route -> Move toward Player. Both are behaving identically.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Everything we need to know of this is in the last picture of the enemy event.


Unfortunately, you left out the most important screenshot: the second page.


If that event is not approaching the player, then there can only be three reasons for this: either the move on the map is blocked, or the second page is active, or a script you added completely changed the event behaviour.


Since it works sometimes, it cannot be a map block - that means the reason for this behaviour is that the second page is active. (unless you have a script that changes everything)


Why the second page is active we cannot say, because you didn't give a screenshot of that page.


Please post that screenshot, then we can continue searching the problem.
 

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses


I did not include the second page because it activated on self switch. Regardless, I tried removing the second page and the self switch call and the result is the same.

I disagree that everything that needs to be known is in the last picture, because these enemy events work fine by default, but somewhere within pictures 1~3, the concept breaks and the NPC's sit completely still. Interestingly, if I collide with the NPC, the exclamation will go off and the battle will go, the only part that's not working is the NPC moving. The NPC's -do- move if I bypass the character select portion entirely, which is why I felt inclined to include it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Okay, first ... those are not scripts. They are events. Scripts are completely different things in RPG Maker, so please try to call anything in those windows events when you need help. It confuses us otherwise.


Second, even though YOU think the second screen may not be needed, WE like to see it. Otherwise you're only giving us half the information. You'd be surprised how often the contents of that second tab IS the cause of the problem, and we can't rule it out until we see it. Your posting here indicates that you don't know what the problem is, so you really don't know if you've provided the right information or not. And having said that, the majority of your post and screenshots is completely irrelevant to the issue. We don't care what you do in choosing your party lineup - what we care about is AFTER the game begins, when the problem happens. The cause is very likely nowhere in most of what you posted.


This won't make a difference, but you can change the autonomous movement to Approach instead of Custom. It'll do the same thing, but requires less processing.


Now, to the actual problem ...


Can you show us a screenshot of the map where the REAL game begins - I'd like to see where these enemies are, where the player begins. Can you highlight the enemies in one colour if they do approach you, and highlight those in another colour that don't? Do they ALL not approach you? Your thread title seems to indicate that this only happens "when the class is changed", however if you ALWAYS have to change the class at the start of the game before even seeing the enemies, then changing class has nothing to do with it. Or are you saying when you bypass that class changing thing (maybe by putting your starting position on the map with the enemies), that they DO approach you? When they don't approach you, do they move around at all? Do they turn? Do they change direction as you walk around, as if they were watching you? If you move the enemy somewhere else, will they approach you? Can you walk to the enemy yourself?


I can almost bet that it's something wrong with your mapping ... the top left tile in B having an X for passage settings maybe (it should always be a star), or you've used a blank tile from B-E to "erase" things you don't want on the map and the blank tile happens to have an X in passage settings (erasing stuff you don't want should always be done with the top left tile in B ). Or maybe you've just got the wrong passage settings for the ground tile.
 
Last edited by a moderator:

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
From the char select map, let's say it takes you to Map X. By going through the process on the char select map, you ultimately start the game on Map X.

If I set the player starting position on Map X instead of the char select map, everything works as intended. If I go through the char select map to Map X, it doesn't. It is not the map itself that is the issue.

On the map lies an autorun event to kind of push things along. I disabled that, so that once I move onto Map X naturally from the char select map, I'm able to roam freely with nothing going on. The NPC's still remain motionless.

It's almost as if the NPC's think all of the tiles are unwalkable, but this is not the case, as the player may roam freely. Again, if I bypass the char select map entirely by placing the Player Start Position onto Map X directly, the NPC's move as they should.

I tested placing one of these enemies a couple of tiles away from the player's start position on Map X and nothing changed. Even standing on a tile adjacent to the NPC does nothing. I must absolutely be the one to collide with them, as if they're set to simply sit there, which is obviously not true. Distance appears to be irrelevant regardless of where I am positioned on the map. I even set my player starting position on Map X where the char select map would place me and everything works fine, it's literally a case of...

Go through char select map, which is the natural start of the game, and the events don't roam as they should.

-or-

Completely bypass char select map by changing Player Start Position and NPC's roam as they are programmed.

It's a bit of an impasse I'm having great trouble wrapping my head around.

To be as concise as possible, the NPC's do not turn, they do not move, they simply stand there, completely motionless. I have attempted to reverse engineer the problem as much as possible by removing any kind of Autorun and/or Parallel Process event from the map and the issue remains the same. At bare bones, if I go through the class select map and event scripting, it breaks, if I change my start position and ignore the class select map, it works.

So, from Map X, we can visit Map Y. I placed some NPC's onto Map Y with identical behavior and noted that map changes in and of themself have no alteration on the effect. No matter what map I'm on, the NPC's will not move towards me - they will not move at all - if I go through the class select map. If I bypass the class select map, then all of the NPC's on every map work as intended.

Map Y literally has no events on it except for a couple of these NPC's which were copy+pasted from the above snippet given. I place my Player Start Position on Map Y and all is well, just like it was if I placed it in Map X. The issue appears to solely be something wrong happening in the char select map to mess the whole process up somehow.

So, to reverse engineer it further, I changed the event in the char select map, so that instead of it taking you to Map X, it takes you to Map Y. Once again, even with no issues regarding my player moving (so it's not the map or the tiles), and no ongoing events whatsoever, the NPC sits there. If I reload the game with the Player Start Position starting me on Map Y, the NPC chases me to the end of the earth as intended.

It's almost as if by changing the actor's class and sprite, the NPC's somehow don't recognize me as the player. I don't know.

EDIT:

I changed the NPC movement to be Random now, instead of approaching the player. The NPC still doesn't move. This makes the situation especially interesting, because it's not a case of the NPC simply not seeing the player, but a case of the NPC's just... not moving. At all. Under any circumstance. I hate to keep saying this, but this issue does not occur if I bypass the char select map.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I'm rather fascinated by this now.


What if you create a new map and set it as your starting map, and it has a single event that sends you to map X? Do they approach you then?


Are ALL of your enemy events the same? They all have EXACTLY the same tabs, and exactly the same contents on each tab, as the one you showed above? And (you might have just said it, but I missed it) this happens to ALL NPCs - it's not a case of some working and some not?


Also, can we see the rest of your class chooser event?


Do you have any custom scripts in your game?
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I second Shaz. Do you have Yanfly's stop all movement script installed? If you do, and you turned on switch 41 (the default) no NPC's will move.
 

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
I second Shaz. Do you have Yanfly's stop all movement script installed? If you do, and you turned on switch 41 (the default) no NPC's will move.
There it is. For some reason the script had Switch 22~23 in use. I installed a bunch of YF scripts I thought would be interesting, but haven't gotten around to checking them all out. Changed this one over, now everything works.

Case closed. Thanks!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
yeah - ALWAYS look for switches/variables when you add a new script. Not doing so causes heaps of problems that are sometimes hard to track down, yet it's a basic thing that should ALWAYS be done with scripts.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top