Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> How do you get an NPC to follow you?
bl0gmonkey78
post Mar 24 2010, 03:50 AM
Post #1


Level 1
Group Icon

Group: Member
Posts: 11
Type: Writer
RM Skill: Beginner




Yes, I am very knew to RPG Maker XP and I can't even do my own sprites or scripting, but that is beside the point. I'm making a fan-base game and I would like to know who to get an NPC to follow the main character

The main character touches a horse and wants to lead it in the village, but I don't know how to get it to do that. I hope to get the horse to follow it until a cutscene, but I feel as if this program is too limited for that. Somebody help! I've been trying to get it for like two hours because I'm a total noob.
Go to the top of the page
 
+Quote Post
   
Logan110
post Mar 24 2010, 04:19 AM
Post #2


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




Since you want it to stop following at a cutscene you'll probably want to use a switch.
Make the horse event - Activated by Action Key
Switch 1 On

Make a new tab that has a custom move route
The move route will be - Move towards player.
When your cutscene is activated Turn Switch 1 off.


__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
bl0gmonkey78
post Mar 24 2010, 04:32 AM
Post #3


Level 1
Group Icon

Group: Member
Posts: 11
Type: Writer
RM Skill: Beginner




QUOTE (Logan110 @ Mar 24 2010, 07:19 AM) *
Since you want it to stop following at a cutscene you'll probably want to use a switch.
Make the horse event - Activated by Action Key
Switch 1 On

Make a new tab that has a custom move route
The move route will be - Move towards player.
When your cutscene is activated Turn Switch 1 off.


On the second tab, I had to change the character actor graphic because I no longer had any control on the character and he was just kinda stuck there. But the horse is still not following me. Are there any scripts that might work?
Go to the top of the page
 
+Quote Post
   
bulmabriefs144
post Mar 24 2010, 04:55 AM
Post #4


Something Other Than Level 16
Group Icon

Group: Revolutionary
Posts: 627
Type: Developer
RM Skill: Advanced




QUOTE (Logan110 @ Mar 24 2010, 05:19 AM) *
Since you want it to stop following at a cutscene you'll probably want to use a switch.
Make the horse event - Activated by Action Key
Switch 1 On

Make a new tab that has a custom move route
The move route will be - Move towards player.
When your cutscene is activated Turn Switch 1 off.


That's only part of it. You'd also need for the next screen (and however many it followed you) an event directly behind the teleport in location, which was set to switch on and appear. And you'd need a variable to determine which entrance you can in to make it so that character isn't across the screen when you double back. Typically this is why caterpillar things involve the whole variable thing, but if you just want it to be a simple follow character, you need the following code at every screen exit:

<->Hide Screen
<->Teleport (ScreenName X, Y position)
<->Variable Entrance number Set, (whatever number you choose)
<->Show Screen

Note: Don't worry about continuing to number all the way up from 1 to 1200 or whatever, just use 1 (north entrance), 2 (south entrance), 3 (west), 4 (east) or some similar system.

Then when activating the follower position, checkbox IsFollowing ON, and checkbox Entrance is (the number you chose).

This should work from anything 2k onward (not sure about VX since I don't use that) but you have to do two things as well, make sure the character is same level as the character (as in not below or above), and goto the movement customs and tell it to ignore impossible moves (if the character is stuck it might be because it lagged-jammed from following too closely or when you stopped), make sure the speed is right, and the processs repeats.

This post has been edited by bulmabriefs144: Mar 24 2010, 05:02 AM


__________________________
Go to the top of the page
 
+Quote Post
   
bl0gmonkey78
post Mar 24 2010, 06:05 AM
Post #5


Level 1
Group Icon

Group: Member
Posts: 11
Type: Writer
RM Skill: Beginner




QUOTE (bulmabriefs144 @ Mar 24 2010, 07:55 AM) *
QUOTE (Logan110 @ Mar 24 2010, 05:19 AM) *
Since you want it to stop following at a cutscene you'll probably want to use a switch.
Make the horse event - Activated by Action Key
Switch 1 On

Make a new tab that has a custom move route
The move route will be - Move towards player.
When your cutscene is activated Turn Switch 1 off.


That's only part of it. You'd also need for the next screen (and however many it followed you) an event directly behind the teleport in location, which was set to switch on and appear. And you'd need a variable to determine which entrance you can in to make it so that character isn't across the screen when you double back. Typically this is why caterpillar things involve the whole variable thing, but if you just want it to be a simple follow character, you need the following code at every screen exit:

<->Hide Screen
<->Teleport (ScreenName X, Y position)
<->Variable Entrance number Set, (whatever number you choose)
<->Show Screen

Note: Don't worry about continuing to number all the way up from 1 to 1200 or whatever, just use 1 (north entrance), 2 (south entrance), 3 (west), 4 (east) or some similar system.

Then when activating the follower position, checkbox IsFollowing ON, and checkbox Entrance is (the number you chose).

This should work from anything 2k onward (not sure about VX since I don't use that) but you have to do two things as well, make sure the character is same level as the character (as in not below or above), and goto the movement customs and tell it to ignore impossible moves (if the character is stuck it might be because it lagged-jammed from following too closely or when you stopped), make sure the speed is right, and the processs repeats.


It's still a little hard to understand, do you think you could show me what kind of variable and where at to put the event?
Go to the top of the page
 
+Quote Post
   
Fixxxer4153
post Mar 24 2010, 10:25 AM
Post #6


Level 10
Group Icon

Group: Revolutionary
Posts: 155
Type: Developer
RM Skill: Beginner




It might be easier if you found a caterpillar script that allows party members to follow the main character.
Then you'd just have to make a new actor, the horse, and add it to the party to make it follow. Of course any other party members will also be on the map and follow the controlled character, and, unless you've changed the max party members, if there are already four members to your party, you won't be able to add the horse to the group.
Remember when you add the horse, you also have to erase the event that showed the horse in the first place, or you'll have two of the same horse on the map.
The only real issue with this, is if you have any battles in the area in question, the horse will be in the battle with you.
Other than that, it should work the way you want it to.
Then, during your cut scene sequence, remove the horse from the party, at the same time, activate an event that becomes the horse that doesn't need to follow you anymore. It's actually a lot simpler than it sounds.

Hope this helps! smile.gif


__________________________
"Then it comes to be that the soothing light at the end of your tunnel... is just a freight train comin' your way..."


Which Final Fantasy Character Are You?
Final Fantasy 7
Go to the top of the page
 
+Quote Post
   
bl0gmonkey78
post Mar 24 2010, 10:53 AM
Post #7


Level 1
Group Icon

Group: Member
Posts: 11
Type: Writer
RM Skill: Beginner




QUOTE (Fixxxer4153 @ Mar 24 2010, 01:25 PM) *
It might be easier if you found a caterpillar script that allows party members to follow the main character.
Then you'd just have to make a new actor, the horse, and add it to the party to make it follow. Of course any other party members will also be on the map and follow the controlled character, and, unless you've changed the max party members, if there are already four members to your party, you won't be able to add the horse to the group.
Remember when you add the horse, you also have to erase the event that showed the horse in the first place, or you'll have two of the same horse on the map.
The only real issue with this, is if you have any battles in the area in question, the horse will be in the battle with you.
Other than that, it should work the way you want it to.
Then, during your cut scene sequence, remove the horse from the party, at the same time, activate an event that becomes the horse that doesn't need to follow you anymore. It's actually a lot simpler than it sounds.

Hope this helps! smile.gif


Hmm...every time I add a script and try to run it, i get an error saying that it a certain file cannot be found or there is a programming error. Already done it like who knows how many times? I just want to find a really good script that won't fail on me cuz I can't program to save my life lol.
Go to the top of the page
 
+Quote Post
   
Logan110
post Mar 24 2010, 11:46 AM
Post #8


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




QUOTE (bl0gmonkey78 @ Mar 24 2010, 08:32 AM) *
On the second tab, I had to change the character actor graphic because I no longer had any control on the character and he was just kinda stuck there. But the horse is still not following me. Are there any scripts that might work?



I have no idea what you did because I just did it in a test project and it worked fine. If you still dont understand by the time I get home from work I'll just make the event and screen shot it for you.


__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
stripe103
post Mar 24 2010, 01:53 PM
Post #9


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 740
Type: Mapper
RM Skill: Intermediate




I would make an actor for the horse, use a caterpillar script and then just add the horse to the party. If you dont want a such script trough the game, most of them can be turned off.


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   
Logan110
post Mar 24 2010, 08:12 PM
Post #10


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




This was just with a simple self switch but it works exactly the same as a global switch.
[Show/Hide] pictures





__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
bl0gmonkey78
post Mar 26 2010, 04:15 AM
Post #11


Level 1
Group Icon

Group: Member
Posts: 11
Type: Writer
RM Skill: Beginner




QUOTE (Logan110 @ Mar 24 2010, 11:12 PM) *
This was just with a simple self switch but it works exactly the same as a global switch.
[Show/Hide] pictures





Thanks! It worked! You guys are such a big help! Seriously, I wouldn't be able to do all this by myself lol.
Go to the top of the page
 
+Quote Post
   
stripe103
post Mar 26 2010, 07:15 AM
Post #12


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 740
Type: Mapper
RM Skill: Intermediate




That is what this site is for.


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 01:03 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker