NPC HELP!

Posts

Pages: 1
If you display a message, the npc can still move around. For example: I have an npc following me and there's a table, I press the table which shows the message "A table!" but when it does the npc can still follow me instead of stoping while I'm reading the text. I want the npc to stop in its movement while I display messages. Help please, I'm using VX.
Caz
LET'SBIAN DO THIS.
6813
Hm, I had a look around on Google for this and couldn't actually find anything. In previous makers, there used to be a "stop all movement" button but I can't find that in VX either.

The least complicated solution I can think of is to have a switch called "stop movement". Turn the switch on when the player approaches the table, and turn it off at the end of it saying "A table!"

Then, on each of your NPCs, make another page. Give it the same sprite, but turn movement routes off and make the page only activate when your "stop movement" switch is on. This means the NPCs will flip to this page once you speak to the table (the switch comes on), and back to the first page once you're done (the switch turns back off).

There may be a script for this if you didn't want to do this for everything, but this is the cleanest way around it I can think of.
Jeroen_Sol
Nothing reveals Humanity so well as the games it plays. A game of betrayal, where the most suspicious person is brutally murdered? How savage.
3885
You're forgetting the facing of the NPC, Caz.

For every moving NPC, you'd have to save the facing in a variable, and make four event pages, one for each direction.

Say, if facing down, set variable facing to 1, 2 for left, 3 for right, 4 for up.

Make sure the facing pages are in the same order.
Down triggers when facing greater or equal to 1, left same with 2, right with 3, up with four.

Then after the table message put the variable back to 0.
Caz
LET'SBIAN DO THIS.
6813
Huuurrrr, forgot about that.. XD That'd suck if you had a lot of moving NPCs.

What if, on the second page, you gave it a custom route with "turn to hero"? You could be fairly sure that if the NPC was following the player, they'd be facing him too.
I fixed it the way you said, Caz. But I used a variable instead x) works fine ^^
Caz
LET'SBIAN DO THIS.
6813
Oh, goodgood! Like Jeroen said, it may look a bit weird if the NPC suddenly starts to look in another direction halfway through walking towards you, so you can use Jeroen's or my method to fix it if it's a big deal. :P
Jeroen_Sol
Nothing reveals Humanity so well as the games it plays. A game of betrayal, where the most suspicious person is brutally murdered? How savage.
3885
When you use turn to player, don't you see him change direction for a split second? I guess it's less tedious than my approach, though :)
Caz
LET'SBIAN DO THIS.
6813
It depends on the NPC's frequency. Provided they're not diving around the place like a lunatic, it should be okay. ^_^
Pages: 1