Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Moving an NPC (event) from one map to another

I looked all in events, and I cannot figure out how to do this. Here's the scenario of what I would like to occur:

1. My character talks to the NPC
2. The NPC disappears and shows up on another map, but only after my character has talked to the NPC first.

I DID see a 'set event location' command, but apparantly that only works within the same map... hmm...
 
Ok, here's what you have to do:

1. Make the NPC event
2. Make your NPC graphic, and use the message box command to make him say what you want him to say.
3. make a new page, located on the top of the event box
4. On page 2, in the "Preconditions box" check one of the Switch boxes, and name the Switch whatever you want, I'll use "No NPC"
5. Make a new map
6. Make an NPC event on that map
7. Make a new page and on page 2, make the NPC graphic and put whatever stuff you want him to say.
8. Check the switch box on that page and use Switch 2, or in this case "NPC"
9. Go back to the first NPC event.
10. After the message box on page 1, go to Switch Operation in Event Commands
11. for specific switch, choose "No NPC" and make sure its selected to ON
12. make another Switch Operation, this time choose "NPC" and make sure its ON
13. Make a transfer character to one map to the other (to see if it worked)
14. See if it works

If you have any troubles, don't hesitate to ask.
 
Okay uhh lemme tell you what I did step by step, cuz I got kinda confused about the middle.....

vincestick":1sidox0f said:
Ok, here's what you have to do:

1. Make the NPC event - got it
2. Make your NPC graphic, and use the message box command to make him say what you want him to say. - got it
3. make a new page, located on the top of the event box - got it
4. On page 2, in the "Preconditions box" check one of the Switch boxes, and name the Switch whatever you want, I'll use "No NPC" - got it
5. Make a new map - got it
6. Make an NPC event on that map - got it
7. Make a new page and on page 2, make the NPC graphic and put whatever stuff you want him to say. - I'm understanding here that I'm suppose to leave page one blank, or at least that's what I did.....
8. Check the switch box on that page and use Switch 2, or in this case "NPC" - got it
9. Go back to the first NPC event. - got it
10. After the message box on page 1, go to Switch Operation in Event Commands - I didn't see a 'Switch Operation', I only saw 'Control Switches'. Well anyway I set the control switch.
11. for specific switch, choose "No NPC" and make sure its selected to ON - Not sure about Specific Switch, didn't see that either.
12. make another Switch Operation, this time choose "NPC" and make sure its ON - Once again, I couldn't find 'Switch Operation'.
13. Make a transfer character to one map to the other (to see if it worked) - tested it
14. See if it works - tested

If you have any troubles, don't hesitate to ask.

Result: I tried messing around with the control switches, however, in some cases I couldn't get the NPC to disappear, in others, he would disappear but then wouldn't show up on the other map. Any ideas?

---------------------------------------------------------------------------------------------

EDIT: After messing around with it awhile, I got it to work, however there was a strange glitch with one of my scripts.....

What I did.....

For the event which the NPC was suppose to warp to:
- Created a switch named NPC and checkboxed it on the event page

For the event where the NPC was initially:
- Used Self Switch A = ON along with a blank page to make the NPC disappear once my character was done talking to him.
- Used Control Switch event command after the Self Switch with NPC = ON

Now here's the glitch..... I have a caterpillar script installed, and when the control switch is activated, ALL my caterpillar party members DISAPPEAR! Whats up with that?

---------------------------------------------------------------------------------------------

EDIT #2 >READ THIS ONE<: Alrighty, well.... after doing abit of research, it turned out that the caterpillar script turned off with switch 2, and I was actually using switch 2 to do the event XD *feels dumb*
Okay so NOW the issue is.... when I talk to the NPC initially, after the point where he disappears, the game FREEZES. So what now? O_o

Minor edit: Another little thing I tried...
For the event where the NPC was suppose to warp to:
- Turn switch one ON
For the initial NPC event:
- Turn Control Self Switch B ON [A is in use currently]
- Condition Self Switch B ON for a new page
- Put Control Switch 1 = ON for the new page

The problem with THAT is, the NPC doesn't show up at the new event.... soo what now?
 
Think of it this way: you're not teleporting the NPC event. Instead, you make the NPC event disappear on one map and another event with the same NPC graphic appear on a different map.

So on the first NPC event, after talking to him, use "Control Switches: [NPC] = ON". Create a New Page with the Condition "Switch [NPC] is ON" and leave it blank.

Now go to the second map, and create the NPC event again with a graphic and whatever you want him to say on this map. Now check the Condition "Switch [NPC] is ON" again. This way, he will only appear once you've talked to him on the previous map.

Get what I'm saying now?
 
Okay I'll post screenshots of events, since everything's set to action button, not autorun. I actually don't really have it as simple as just an NPC talking and then the Control Switch set... I have several different types of events, and I think one might be conflicting, maybe in particular the Self Switch I have^^; Anyway.... here we go...

First off... the initial NPC event, page 1 (top half):

http://img102.imageshack.us/img102/176/page1half1jh7.jpg[/img]

The initial NPC event, page 1 (bottom half):

http://img295.imageshack.us/img295/3923/page1half2ws9.jpg[/img]

The inital NPC event, page 2 (top half):

http://img232.imageshack.us/img232/8588/page2half1xl2.jpg[/img]

The initial NPC event, page 2 (bottom half):

http://img144.imageshack.us/img144/5161/page2half2bd7.jpg[/img]

The initial NPC event, page 3:

http://img49.imageshack.us/img49/5475/page3bq5.jpg[/img]

Finally, the secondary NPC event, first and only page:

http://img152.imageshack.us/img152/2883/secondarypage1kc5.jpg[/img]
 
You might need to make that second NPC event two pages, just to be safe.  I have no idea why that would freeze, as long as the set move route is set to "ignore if can't move," or whatever they call that in VX.
 
Well I tried setting the second event to two pages, and also everything is set to 'skip is cannot move'. The game still freezes, exactly the moment that the switch should be activated. I'm at a loss....
 
You need two event pages for the second event.  The first completely blank and the second for when the switch is on.  I haven't been following this thread, but from the event pages, that's the only thing I found that could cause a problem.
 
Actually you don't need a second blank page, it's redundant because the event automatically won't show if the Condition isn't set (at least in XP, that is).

I don't see what could be the problem... do you have any common events with that Condition switch? Any other events that have to do with the switch?
 
Regi":2p2j1z8t said:
I don't see what could be the problem... do you have any common events with that Condition switch? Any other events that have to do with the switch?

AHA! I checked my common events and somehow I had one of my common events set with that switch... I set the common event so that it didn't include the switch, and voila! No more freezing! ^__^ Thank you guys so much for your help, I can't believe I was overlooking such a simple solution... at least I understand more about switches now too. This is resolved now! :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top