Pet Follower Script

Pet Follower v1.1

​



Created by Neon Black

​

What is it?

This allows you to have a pet follow you around like a follower wherever you go. The pet goes at the end of the caterpillar chain and just follows you around. This script allows you to use the followers like normal and just places the pet as the last follower.

How can I use it?

Place this script anywhere in the materials section above main. If you notice incompatibility with another script, place this script above that script. If you still experience incompatibility issues, please post what scripts you are using as well as what kind of error you are getting. To have a pet follow you, just use a script call with one of the four different commands. The commands are as follows.

  • pet(x, y) - Set the pet's sprite and index where "x" is the filename of the sprite and "y" is the index in the sprite. The file name MUST be in quotation marks. Example: pet("animal", 1) will make the RTP cat follow you around.
  • remove_pet - Removes the pet from the followers. You must use the "pet()" command above to use it again.
  • hide_pet - Hides the pet from view. Since the pet still shows up even when followers are hidden this will cause the pet to be hidden.
  • show_pet - Show the pet again after hiding it.
  • pet_motion - Pet animation continues even when the player is standing still.
  • pet_stop - Pet animation stops. Pet is only animated while the player is walking.

What does it work with?

It should work with most other scripts. If you notice any incompatibilities, please let me know.

Alias -

Game_Interpreter: remove_pet, hide_pet, show_pet, pet

Game_Followers: initialize

Game_Follower: refresh

New Objects -

Game_Followers: remove_pet

Game_Follower: pet?

How can I get the code?

Version 1.0 (base script, 6.18.2012) is available from my pastebin account here.

I would like to use this code.



This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's Disclaimer:

I saw this request and thought it looked easy enough. Sure enough it was. Anyway, it's great for having a pet following you, but it can also be used to have non-fighting npcs follow you around. Anyway, enjoy.
it like the legend of heroes game
Hey is it an easy enough tweak to make it so that when you turn around you can talk to the pet? Like make it an event that follows you? This would be useful in making a pokemon type game where pikachu follows you and can talk to you? Or what about pets that follow events... making it easer to say do a bunch of baby chicks following the mama chicken?
Hey is it an easy enough tweak to make it so that when you turn around you can talk to the pet? Like make it an event that follows you? This would be useful in making a pokemon type game where pikachu follows you and can talk to you? Or what about pets that follow events... making it easer to say do a bunch of baby chicks following the mama chicken?
this can't be done with script only. this can be done with script and advance eventing!

i'm a good eventer in rpg maker vx ace and made a few totally advance eventing system but i still think or releasing to the public on how i did that.
Hey is it an easy enough tweak to make it so that when you turn around you can talk to the pet? Like make it an event that follows you? This would be useful in making a pokemon type game where pikachu follows you and can talk to you? Or what about pets that follow events... making it easer to say do a bunch of baby chicks following the mama chicken?
There are some slight issues with this, but nothing that can't really be fixed. The main issues are sort of user end, though. Since your party still displays while a pet displays there are quite a few possible ways for it to be impossible to talk solely to the pet. Not too much of an issue, but I think I'll release this sort of system separate so you can talk to your party as well. No big issue though. I'll let you know if I come up with anything (have a few different things queued up to do).

Short answer: I can do it, but it's not an "easy tweak".
Hey i have a little problem... i start the test play an get the error: Scripts "Pets" line 2: NoMethodError occured. undefined method `[]=´ for nil:NilClass
You've butchered the code, most likely by removing the header.  Copy the script into your project EXACTLY as-is.  It has no config, so there's no reason to modify any of the script, and people aren't going to be poking in your project, so no harm in leaving my header up there.
Just the script I needed!!!!! Thanks!
Doesn't seem to be compatible with VE-Follower Options.  Great script!  If I can manage to set up an event to talk to my pet, this will be the one of the main features of my game!
Spoiler
Pet Follower v1.1

Created by Neon Black

What is it?
This allows you to have a pet follow you around like a follower wherever you go. The pet goes at the end of the caterpillar chain and just follows you around. This script allows you to use the followers like normal and just places the pet as the last follower.

How can I use it?
Place this script anywhere in the materials section above main. If you notice incompatibility with another script, place this script above that script. If you still experience incompatibility issues, please post what scripts you are using as well as what kind of error you are getting. To have a pet follow you, just use a script call with one of the four different commands. The commands are as follows.
  • pet(x, y) - Set the pet's sprite and index where "x" is the filename of the sprite and "y" is the index in the sprite. The file name MUST be in quotation marks. Example: pet("animal", 1) will make the RTP cat follow you around.
  • remove_pet - Removes the pet from the followers. You must use the "pet()" command above to use it again.
  • hide_pet - Hides the pet from view. Since the pet still shows up even when followers are hidden this will cause the pet to be hidden.
  • show_pet - Show the pet again after hiding it.
  • pet_motion - Pet animation continues even when the player is standing still.
  • pet_stop - Pet animation stops. Pet is only animated while the player is walking.
What does it work with?
It should work with most other scripts. If you notice any incompatibilities, please let me know.

Alias -
Game_Interpreter: remove_pet, hide_pet, show_pet, pet
Game_Followers: initialize
Game_Follower: refresh
New Objects -
Game_Followers: remove_pet
Game_Follower: pet?

How can I get the code?
Version 1.0 (base script, 6.18.2012) is available from my pastebin account here.

I would like to use this code.

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's Disclaimer:
I saw this request and thought it looked easy enough. Sure enough it was. Anyway, it's great for having a pet following you, but it can also be used to have non-fighting npcs follow you around. Anyway, enjoy.

I've just used this script awhile ago, but I can't seem to get it to work.

this is what i did:

go to the npc event page

script call and typed in pet("people1", 2)

leave the npc autonomous movement to 'fixed'

any idea to get it to work?

Thanks!
Hey, Do you mind if I use the scritp in my game. The game will be public but i will mention yo in the credits!
Can I use this?  🙂

I will credit you for it.  😉
Hello. I am having trouble using the script and was wondering if you have a video or picture instructions on how to use this script.


Thank you for reading.

Original thread: https://forums.rpgmakerweb.com/threads/pet-follower-script.2635/