Jump to content


Photo

NPC Run Off Screen

NPC Off Screen

This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1 danielrobertcampbell

danielrobertcampbell

    Advanced Member

  • Members
  • 116 posts

Posted 17 December 2012 - 05:30 PM

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!

#2 Chad Sexington

Chad Sexington

    Advanced Member

  • Members
  • 168 posts

Posted 17 December 2012 - 05:40 PM

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.

Edited by Chad Sexington, 17 December 2012 - 05:40 PM.


#3 Shaz

Shaz

    Advanced Member

  • Global Moderators
  • 12,190 posts

Posted 17 December 2012 - 05:44 PM

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)

#4 Kyle

Kyle

    Advanced Member

  • Members
  • 80 posts

Posted 17 December 2012 - 05:44 PM

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

Edited by SmartyPants, 17 December 2012 - 05:45 PM.


#5 danielrobertcampbell

danielrobertcampbell

    Advanced Member

  • Members
  • 116 posts

Posted 17 December 2012 - 05:45 PM

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?

#6 Kyle

Kyle

    Advanced Member

  • Members
  • 80 posts

Posted 17 December 2012 - 05:46 PM

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

#7 Shaz

Shaz

    Advanced Member

  • Global Moderators
  • 12,190 posts

Posted 17 December 2012 - 05:48 PM

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.

#8 Liak

Liak

    Advanced Member

  • Early Adopter+
  • 733 posts

Posted 17 December 2012 - 06:00 PM

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.

#9 danielrobertcampbell

danielrobertcampbell

    Advanced Member

  • Members
  • 116 posts

Posted 17 December 2012 - 06:04 PM

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!

#10 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,350 posts

Posted 17 December 2012 - 06:46 PM

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.

logo_dropshadow_zps9089e8b6.png
Out now!!