NPC's Move While Text is Displayed?

Status
Not open for further replies.

MasterLagger

Odder than Odd
Veteran
Joined
Dec 28, 2013
Messages
58
Reaction score
5
First Language
English
Primarily Uses
I've noticed that when a text box is displayed in-game that the NPC's that wander around still move about. This isn't a big problem at the moment, but it could be later on when I start adding enemy NPC's. Say for example, you open a treasure chest and a 'You got...blahblahblah' text box pops up. An enemy NPC will still approach the player while the message is present and attack the player.

I may be missing something obvious, but how would I stop NPC's from moving while the Text Box is displayed?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,132
Reaction score
12,404
First Language
English
Primarily Uses
RMMV
Moving this to RGSSx Script Support as it will require a very simple mod to a script. If nobody gives you that mod by the time I get home this afternoon, I'll come back and provide it.
 

MasterLagger

Odder than Odd
Veteran
Joined
Dec 28, 2013
Messages
58
Reaction score
5
First Language
English
Primarily Uses
What kind of script mod? I tried searching the forum without any luck finding the edited script you mentioned.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,132
Reaction score
12,404
First Language
English
Primarily Uses
RMMV
I did not mention any existing script. I said it would require a very simple script mod, which I would give to you if nobody else had done it by the time I got back.

Create a new slot in Materials, and paste the following script in. It can go right at the bottom of your custom scripts.

This will stop any events that have AUTONOMOUS MOVEMENT - so random, approach, or a custom move route. It will NOT stop events where you have issued a Set Move Route command - since sometimes you want text shown as part of a cutscene and you WANT your NPCs to move a particular way while text is still showing.

Code:
class Game_Event < Game_Character  alias shaz_wait_for_message_game_event_update_self_movement update_self_movement  def update_self_movement    return if $game_message.busy? || $game_message.visible    shaz_wait_for_message_game_event_update_self_movement  endend
 

MasterLagger

Odder than Odd
Veteran
Joined
Dec 28, 2013
Messages
58
Reaction score
5
First Language
English
Primarily Uses
It works perfectly! Thank you.

BTW, I find it kinda funny you could stick your username in the script.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,132
Reaction score
12,404
First Language
English
Primarily Uses
RMMV
All scripters do that - the more you use scripts, the more you'll see scripters adding their names. I put my username and a short script description when I alias a method.


It means you could get half a dozen scripters who alias the same script, and will never have alias names clashing (when they do, it causes "stack too deep" errors).


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Last edited by a moderator:
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

I was today years old when I realized I could choose where to put choices in VNMaker. Oi.
What if I start to make final boss first then crawl down from there to make lesser bosses
i don't even know why i bother. Trying to to a simple candle light to flicker. Hour later no progress.

Forum statistics

Threads
97,842
Messages
947,296
Members
129,060
Latest member
choibento
Top