NEED HELP WITH "GATE KEEPER" PROGRAMING
Posts
Pages:
1
Hello, I just registered here. I'm pretty new to the RPG Maker program, I've only had it 3 days. But I've learned a lot about it in those 3 days, like what all of the tools do, but I'm not too good at using those tools yet. I'm working on a small game, nothing special it's really just an experiment to test out programming and such, and I had this thing I wanted to add to the beginning of the game but can't seem to get it to work.
Okay, so in the beginning you're in a (very) small place consisting only of a storage shed. There's only one way out of this area and it's blocked by an NPC who tells you to look in the storage shed, and after you do a cutscene (which took forever for me to figure out how to program, I'm pretty proud of it) plays, and a new playable character is add to the player's party.
Now, here's how I want this to work, but I just can't seem to get it right:
1. Game starts. You talk to the NPC and he tells you to look in the storage room.
2. You do so, the cutscene plays and you have a new party member.
3. You go back to the NPC, talk to him, and he moves out of the way so you can pass and explore the world beyond.
I have everything except the 3rd one down. I got the first and second dialogs down, where he tells you to go into the shed and says he'll move respectively. I got it so he will move down allowing you to pass after you talk to him with the second party member in tow, but here's the problem. I want the NPC to say a third line of dialog if you talk to him after he moves, but no matter what I do one of two things happens:
1. He says the first line of dialog normally, but after you have the second party member he says the third line of dialog and does not move, leaving you trapped at the beginning of the game.
2. He says the second dialog line and moves normally, but if you talk to him again he repeats the second dialog line again and moves down again rather then saying the third line of dialog.
So, yeah, this is a lot of text I know but I really need some help with this.
Does anyone understand this and know a solution? I use RPG Maker 2003 so ONLY post solutions that will work with that program.
Thank you for your time.
Okay, so in the beginning you're in a (very) small place consisting only of a storage shed. There's only one way out of this area and it's blocked by an NPC who tells you to look in the storage shed, and after you do a cutscene (which took forever for me to figure out how to program, I'm pretty proud of it) plays, and a new playable character is add to the player's party.
Now, here's how I want this to work, but I just can't seem to get it right:
1. Game starts. You talk to the NPC and he tells you to look in the storage room.
2. You do so, the cutscene plays and you have a new party member.
3. You go back to the NPC, talk to him, and he moves out of the way so you can pass and explore the world beyond.
I have everything except the 3rd one down. I got the first and second dialogs down, where he tells you to go into the shed and says he'll move respectively. I got it so he will move down allowing you to pass after you talk to him with the second party member in tow, but here's the problem. I want the NPC to say a third line of dialog if you talk to him after he moves, but no matter what I do one of two things happens:
1. He says the first line of dialog normally, but after you have the second party member he says the third line of dialog and does not move, leaving you trapped at the beginning of the game.
2. He says the second dialog line and moves normally, but if you talk to him again he repeats the second dialog line again and moves down again rather then saying the third line of dialog.
So, yeah, this is a lot of text I know but I really need some help with this.
Does anyone understand this and know a solution? I use RPG Maker 2003 so ONLY post solutions that will work with that program.
Thank you for your time.
I think your only using one game page for your npc. Try to add another one, should be at the top of the event page when you create/edit an event/npc. Make sure you have a condition that turns on the second game page, like turning a switch on. Don't use branches though use the options that are above the event's sprite. Make sure to turn the switch on in the first page when you want your npc to say different dialogue. You should have him move out of the way before turning on the switch so he doesn't move again when you talk to him. Make the third line of dialogue on the second page. I hope I solved your problem. If not then show me a screen shot of your coding so I can see what you did wrong or didn't do.
I used three pages of coding on this one NPC, one page for the first dialog, one page for the second dialog and the movement, and one for the third dialog. I tried using switches but I would always get the first outcome, where he says the third line of dialog in the place of the second line.
Since I couldn't get switches to work, I simply checked the checkbox in the second page that makes the second page of coding activate when the second member is in the party.
I think this is the problem, and I know switches could be a solution, but every time I try switches I get unwanted effects, like the player controlled character's movement locking up completely.
Since I couldn't get switches to work, I simply checked the checkbox in the second page that makes the second page of coding activate when the second member is in the party.
I think this is the problem, and I know switches could be a solution, but every time I try switches I get unwanted effects, like the player controlled character's movement locking up completely.
Here is a simple tutorial on how to use switches.
http://rpgmaker.net/tutorials/320/
Also it sounds to me like your using auto-start if your character's movement is locked. Never use auto-start without erasing the event. I don't know how you have your event set up, so I'm just going to show you a simple way to do what you want. Try to learn from it and not just copy it.
Map Event:
Page 1
Preconditions: (Don't check anything.)
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>
Page 2
Preconditions: Check the box next to hero. Then select the party member that joined your party.
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>Move Event:(Select the npc you want to move and the direction you want it to move. Also select the switch you want to turn on to activate the next page.)
<>
Page 3
Preconditions: Check the switch box and select the switch that turned on in the previous page.
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>
I hope this helped.
http://rpgmaker.net/tutorials/320/
Also it sounds to me like your using auto-start if your character's movement is locked. Never use auto-start without erasing the event. I don't know how you have your event set up, so I'm just going to show you a simple way to do what you want. Try to learn from it and not just copy it.
Map Event:
Page 1
Preconditions: (Don't check anything.)
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>
Page 2
Preconditions: Check the box next to hero. Then select the party member that joined your party.
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>Move Event:(Select the npc you want to move and the direction you want it to move. Also select the switch you want to turn on to activate the next page.)
<>
Page 3
Preconditions: Check the switch box and select the switch that turned on in the previous page.
Trigger Condition: Action Key
Event Commands:
<>Message:(Fill this out however you like, this is where the npc talks.)
<>
I hope this helped.
Thanks, it works now! I knew it had something to do with switches but I didn't know you could use an event like this to turn on a switch.
So, basically the switch cases the third page of coding to take effect, and when the NPC is done moving the switch turns on, so he stays in place and says the dialog I want it too.
I'm surprised I didn't figure out something so simple. So, this can be done for other things, right?
Like, if I want a cutscene to happen only once I can trigger a switch that starts the cutscene and at the end of the code I can turn that switch off and erase the event that turns the switch on?
Also, this is off topic, but what does the M and the number under our usernames mean?
So, basically the switch cases the third page of coding to take effect, and when the NPC is done moving the switch turns on, so he stays in place and says the dialog I want it too.
I'm surprised I didn't figure out something so simple. So, this can be done for other things, right?
Like, if I want a cutscene to happen only once I can trigger a switch that starts the cutscene and at the end of the code I can turn that switch off and erase the event that turns the switch on?
Also, this is off topic, but what does the M and the number under our usernames mean?
Yes you could use a switch to trigger a cutscene, but you don't need to erase the event that turns on the switch. You can use other methods of disabling the switch turn on event such as creating another switch to lock the event. This is not recommended though because it creates unneeded switches, but I would use switches for now until you understand the engine better or look in the writing section for tutorials and articles about rm2k3.
As for the m under your name it stands for maker score. Here is a link that will describe it better then I could.
http://rpgmaker.net/articles/455/
As for the m under your name it stands for maker score. Here is a link that will describe it better then I could.
http://rpgmaker.net/articles/455/
M is makerscore
Using erase event only erases the event while your on the map, as soon as you teleport away and then back to the map, the event will be there again.
So your event has 3 pages. The first page is what you see initially.
Then when the switch is activated page 2 becomes what you see. When you talk to page 2 it executes the move command and finishes with another switch.
That switch activates page 3, so when you talk to the npc its on page 3.
Leaving it on page 3 means it will never move again. However, if you leave the map and come back, that NPC will be standing in front of the gate. Whatever his position was before you executed the move command(i think? god its been so long since i used rpgmaker that i dont even know this for sure.) or you could not let the player go to the map or just have some random switch later activate a new page to make the gatekeep invisible. But I wouldn't worry about things like that on your first game.
You would have to make an event do something to auto move him every time you enter the map, or have a second event for his new position. You would make the 1st event invisible with a page 4 and a switch. The second event would use that same switch but have the NPC graphic. Make sense? I think that's what your trying to do.
Instead of using multiple switches, use 1 variable. So to activate a different page on the event you would just add 1 to the variable. A variable acts the same way as a switch except it has more than an ON and OFF position.
Whatever page is further to the right will take priority over the rest.
Using erase event only erases the event while your on the map, as soon as you teleport away and then back to the map, the event will be there again.
So your event has 3 pages. The first page is what you see initially.
Then when the switch is activated page 2 becomes what you see. When you talk to page 2 it executes the move command and finishes with another switch.
That switch activates page 3, so when you talk to the npc its on page 3.
Leaving it on page 3 means it will never move again. However, if you leave the map and come back, that NPC will be standing in front of the gate. Whatever his position was before you executed the move command(i think? god its been so long since i used rpgmaker that i dont even know this for sure.) or you could not let the player go to the map or just have some random switch later activate a new page to make the gatekeep invisible. But I wouldn't worry about things like that on your first game.
You would have to make an event do something to auto move him every time you enter the map, or have a second event for his new position. You would make the 1st event invisible with a page 4 and a switch. The second event would use that same switch but have the NPC graphic. Make sense? I think that's what your trying to do.
Instead of using multiple switches, use 1 variable. So to activate a different page on the event you would just add 1 to the variable. A variable acts the same way as a switch except it has more than an ON and OFF position.
Whatever page is further to the right will take priority over the rest.
@McBrick
Well right now I have this event set up on the same map as the Gate Keeper programming, it makes it so after you see the cutscene in the shed you can't go back into the shed, a message pops up telling the player there's no point in searching the shed again and the player moves back.
That's one way to prevent a cutscene from looping without excessive switches, right?
(In fact, that method I just explained uses no switches at all.)
@Link_2112
In the current test there's no reason or way to go back to the starting point, but you're right, I'll have to do something like that for my other projects where I include something like this.
I could include an extra page of coding in the square on the map that sends the player from the town to the overworld, so that when you go back in the town the NPC will move.
EDIT: I was able to solve the problem by having the switch turn off at the end of the third page, so now the second page replays anytime you enter the town, and therefor the NPC moves but it also plays the third line of dialog when it's done moving.
Well right now I have this event set up on the same map as the Gate Keeper programming, it makes it so after you see the cutscene in the shed you can't go back into the shed, a message pops up telling the player there's no point in searching the shed again and the player moves back.
That's one way to prevent a cutscene from looping without excessive switches, right?
(In fact, that method I just explained uses no switches at all.)
@Link_2112
In the current test there's no reason or way to go back to the starting point, but you're right, I'll have to do something like that for my other projects where I include something like this.
I could include an extra page of coding in the square on the map that sends the player from the town to the overworld, so that when you go back in the town the NPC will move.
EDIT: I was able to solve the problem by having the switch turn off at the end of the third page, so now the second page replays anytime you enter the town, and therefor the NPC moves but it also plays the third line of dialog when it's done moving.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Typically I make one switch for each cut scene, and turn that switch on at the end of the cut scene. Then the event that runs the cut scene has an extra page on the end that does nothing if that switch is turned on.
One switch per cut scene might seem like a lot but it really isn't that bad. You'll probably only end up with a couple per dungeon and a few per town. Just keep them semi-organized. Cut scenes and treasure chests are typically the two primary uses of switches, unless you are creating custom systems.
If you want an NPC to start in a different place after some cut scene has occured, you probably need to create a second event at the new location, and give it a condition so that it only occurs after the cut scene's switch has been turned on. Then give the original event's final page a condition to be invisible and do nothing after the same switch is turned on (so that the NPC doesn't appear in both places).
One switch per cut scene might seem like a lot but it really isn't that bad. You'll probably only end up with a couple per dungeon and a few per town. Just keep them semi-organized. Cut scenes and treasure chests are typically the two primary uses of switches, unless you are creating custom systems.
If you want an NPC to start in a different place after some cut scene has occured, you probably need to create a second event at the new location, and give it a condition so that it only occurs after the cut scene's switch has been turned on. Then give the original event's final page a condition to be invisible and do nothing after the same switch is turned on (so that the NPC doesn't appear in both places).
Pages:
1













