Disable NPC Lock

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Disable NPC Lock v1.0
Shaz
Introduction
This script allows an NPC event to continue on its move route when you interact with it. It will not stop and turn to face you, then continue only when the event is finished. Use this when you want an NPC that will keep going about his/her business while talking to you.

How to Use
Paste into a new slot in Materials, below other scripts.
Add <nolock> as a comment on the event page.


Script
Download Here

FAQ


Credit and Thanks
- Shaz

Author's Notes
Okay to use in commercial games. Credit Shaz.
 
Last edited by a moderator:

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
Oooh this is handy, finally cooks can stop worrying about their meals being burnt when you barge into their kitchens and talk to them xD cheers!
 

callmedan

Friendly Stranger
Veteran
Joined
Dec 27, 2015
Messages
592
Reaction score
918
First Language
Vietnamese
Primarily Uses
RMXP
Nice! Btw, I want to let you know this script also works in XP :kaoswt:

I add these below class Game_Event and it worked
Code:
attr_accessor :clear_page_settings
attr_accessor :setup_page_settings
attr_accessor :lock
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Nice! Very surprising, as XP's methods are usually so massive!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
@callmedan yeah, XP's methods are a bit different. Try this in a new slot:

Code:
class Game_Event < Game_Character
  def lock
    return if @list && @list.size > 1 && @list.select{|cmd| (cmd.code == 104 || cmd.code == 408) && cmd.parameters[0] =+ /<nolock>/i}.size > 0
    super
  end
end
Now, the object.select method is used all over in Ace, but I can't find it anywhere in XP. This might mean it was introduced in a later version of Ruby, and if that's the case it'll give you an error. If that happens just come back and we'll find an alternative.
 

callmedan

Friendly Stranger
Veteran
Joined
Dec 27, 2015
Messages
592
Reaction score
918
First Language
Vietnamese
Primarily Uses
RMXP
@Shaz Thank you so much! But it doesn't work. :( Does the script include only a class?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
did you put it above Main? Does the game crash or do you get a message?
 

callmedan

Friendly Stranger
Veteran
Joined
Dec 27, 2015
Messages
592
Reaction score
918
First Language
Vietnamese
Primarily Uses
RMXP
Yes, I did. The game doesn't crash and I don't get any message. The script just doesn't work. The NPCs still turn toward player to talk.
 
Last edited:

callmedan

Friendly Stranger
Veteran
Joined
Dec 27, 2015
Messages
592
Reaction score
918
First Language
Vietnamese
Primarily Uses
RMXP
The command code should be 108 instead of 104 then it would work. Thank you so much! :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Good hunting! I was so sure that RM kept the same codes all the way through :(
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top