How do I make an NPC disappear after ending its plotscript by making it walk out of view?

Jump to navigation Jump to search
This article does not meet the standard of quality we would like to have. Feel free to revise it and make it better by using the edit link at the top of the page. This tag should be removed when an editor feels it is of high quality.

This is very simple. All that must be done, is have the NPC walk off the screen, then make it disappear. This can be done at any part of plotscripts.

Walking away the NPC[edit]

So the Hero and NPC are exchanging information, and right after the text box that says "Goodbye!" have the NPC walk off the screen using:

walk npc (npc #, direction, distance)
wait for npc (npc #)
  • The NPC number is which NPC it will move. Remember, if there are multiple copies of an NPC on a map, it may move the wrong one.
  • Enter the direction that the NPC will move in the direction argument.
  • The distance is how far the NPC will have to go, (in this case) to leave the camera's view.

So in a real plotscript the commands would look like this.

walk npc (3,south,8)
wait for npc (3)
  • This command would walk the NPC 3 south 8 tiles. Easy enough eh?

You may have to put in multiple "walk" commands if obsticles are in the way so the NPC can walk by them instead of bumping into them. Like this for example:

walk npc (3,south,3)
wait for npc (3)
walk npc (3,west,1)
wait for npc (3)
walk npc (3,south,5)
wait for npc (3)
  • Unless the camrea is following the NPC, it will eventually be out of sight.

Getting rid of the NPC[edit]

1. Use the following command to destroy the npc:

destroy npc (npc #)
  • NOTE: Unless the NPC was created using the "create npc (npc #)" command or NPC data in the edit general map data menu has been set to "Remember state when leaving," the NPC will reappear the next time you enter the map. If you don't want that try the next example.

2. You can also get rid of the NPC using tags.

In custom do the following:

  • Name a free tag "[Character] Walked Away" or anything else. Lets pretend you used tag 12.
  • On the NPC that is supposed to walk away, set it to:
Appear if tag [12] is OFF

(You can do this by pressing left on the keyboard)

  • Then go to your plotscript. At the end of the walk use the following command:
set tag ([12],on)

This way your NPC won't come back unless you set tag 12 back on.

Then just finish off anything you still need to do in the script, make sure to put the "resume player" in and then end your script. Test it until it does exactly what you want.