Archived

This topic is now archived and is closed to further replies.

  • 0
danielrobertcampbell

NPC Run Off Screen

Question

Got, yet another, noob-tastic question for you.

I've got an NPC that is running to the right, and I wan't him to run off screen when he reaches the edge of the map. Currently, he just stops when he reaches the edge. Is there a way to fix this? Thank you!

Share this post


Link to post
Share on other sites

9 answers to this question

If RMVX works the same as RMXP, all you do it change the opacity of the NPC once he reaches the edge of the map. I usually do something like this:

opacity = 200

wait 1

opacity = 150

wait 1

opacity = 100

wait 1

opacity = 50

wait 1

opacity = 0

You don't have to slowly fade them out, but I think it looks better than spites just blinking out of existence.

Share this post


Link to post
Share on other sites

You could just make sure the player stops at a point where the edge of the map will not be seen, and have the NPC continue a tile past the screen. Then make the NPC event disappear (erase event if you don't want to see them on the map anymore until it's reloaded, or turn on a switch and have a second event tab on the NPC with no graphic, so it disappears completely)

Share this post


Link to post
Share on other sites

Chad Sexington's method works, as it makes the event disappear However, if you want to travel back to the map, the event will be back in its original position. Using that method is similar to using Erase Event, which just gets rid of an event until the map is reloaded.

To make the event disappear forever, you have to modify a switch of variable to turn the event into a blank page after it completes its movement route.

EDIT: What Shaz said! :P

Share this post


Link to post
Share on other sites

How do I trigger him being at the edge of the map though? How do I tell him or the game that he has reached that point?

Share this post


Link to post
Share on other sites

Just set his movement route to move to the edge of the screen through your event processing.

Share this post


Link to post
Share on other sites

This is where you need to specify the move route step by step, rather than just saying 'keep moving right'. You're choreographing their movement. You know how many steps it should take. It is more long-winded to have to say 'move right' fifteen times, but in a cutscene, you need to have complete control, and you need to know where everyone is at any point in time.

Share this post


Link to post
Share on other sites

Not necessarily, you can also work with X/Y coordinates of the player and events, but you should really try to avoid scenarios where you have to do it this way. It's rather complicated.

Share this post


Link to post
Share on other sites

That worked perfectly. I just measured out how many times I needed him to move right, then set it to Erase Event once he was out of shot. Thanks!

Share this post


Link to post
Share on other sites

Little note: erase event does not do what you think it does. It's used to temporarily disable an event for the duration of that map. Re-enter the map, and the event will run again. If you want to never have the event run again, you'd need to brush up on the basics of switches :)

Anyways, that's for another thread.

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.