Arkbennett 16 Report post Posted March 22, 2008 Can you say, "Follow the leader"? Well, now we're going to discuss the basic element for a catapiller script - A code that makes other events follow the player.. There are more advanced ways to do it, but that's for you to explore. Q.So why do an event version when I can just use an RGSS script? A. An eventing version is much more managable for special cutscenes or parts in your game, well, for non-scriptors anyway.. Here's the crackdown, I'll display the script, then explain what each command does, after all, eventing is like a whole 'nother language. Basic Catapiller Script: <>Variable: [0001: Player X] = Player X Coords <>Variable: [0002: Player Y] = Player Y Coords <>Variable: [0003: Follower 1 X] = This Event X Coords <>Variable: [0004: Follower 1 Y] = This Event Y Coords <>Conditional Branch: Variable [0001: Player X] > Variable [0003: Follower 1 X] <>Move Event:: This Event : : <>Move Right <> End <>Conditional Branch: Variable [0001: Player X] < Variable [0003: Follower 1 X] <>Move Event:: This Event : : <>Move Left <> End <>Conditional Branch: Variable [0001: Player Y] > Variable [0003: Follower 1 Y] <>Move Event:: This Event : : <>Move Down <> End <>Conditional Branch: Variable [0001: Player Y] < Variable [0003: Follower 1 Y] <>Move Event:: This Event : : <>Move Up <> End I know what your thinking, "OMG great, sexy, intellectual, cunning, amazing and compassionate teacher Arkbennett, I just don't understand what all those bigs words like 'variable' even mean!" I know, it's a dreaded fate not to understand, so, let's delve deeper into it, shall we? First off, typically your going to put this in a reguler event on the map, but you could use it through a common event, but let's not get into that now. Your going to start a new event on the map, name it whatever you want. Your going to set it as a parallel event, I typically set the speed to fast and the frequency to higher. And yes, this coding will go inside the event that you want to follow the player. Now, you see that I split the code, the first portion is going to be part 1, the second; part 2. The first part is the variable set up. This is where your going to save both the X and Y of the player and the followers coordinates. You should have some knowledge of variables, so we won't delve to deep in it. Part 2 is the Conditional Branch, this determines which way the follower should go. It's pretty simple, RMXP's coordinate setup is similer to Quandrant IVs in math (0 starts in the top left) and the X increases as you move right, and the Y increases as you move down. So, for the first conditional branch, <>Conditional Branch: Variable [0001: Player X] > Variable [0003: Follower 1 X] <>Move Event:: This Event : : <>Move Right <> End It's saying, if Player's X coordinate is greater than Follower 1's X, Move Right. Easy peasy, right? Now, if you wanted to add more followers, Make follower 2 follow follower 1, follower 3 follows follower 2, and so on and so forth. I'd suggest putting follower 2 variables and Conditional Branchs in the event that will be follower 2. The same with 3 and 4 and so on. So as an example, follower 2 would look like this.. <>Variable: [0005: Follower 2 X] = This Event X Coords <>Variable: [0006: Follower 2 Y] = This Event Y Coords <>Conditional Branch: Variable [0003: Follower 1 X] > Variable [0005: Follower 2 X] <>Move Event:: This Event : : <>Move Right <> End <>Conditional Branch: Variable [0003: Follower 1 X] < Variable [0005: Follower 2 X] <>Move Event:: This Event : : <>Move Left <> End <>Conditional Branch: Variable [0004: Follower 1 Y] > Variable [0006: Follower 2 Y] <>Move Event:: This Event : : <>Move Down <> End <>Conditional Branch: Variable [0004: Follower 1 Y] < Variable [0006: Follower 2 Y] <>Move Event:: This Event : : <>Move Up <> End Alrighty, I think I got the basic element down of the catapiller script, so, if you have any questions or are confused in any way, please heistate to ask. Just joking go ahead and ask! Share this post Link to post Share on other sites
Polraudio 122 Report post Posted March 22, 2008 Nice way of making a catapiller system. The thing is you have to make 1 event on each map to follow you. Is there any way to change that? Share this post Link to post Share on other sites
Arkbennett 16 Report post Posted March 22, 2008 Actually, yes, there is in fact a way. It's much more advanced though. This is just a more simple and basic way of doing it. Share this post Link to post Share on other sites
Breadfan 0 Report post Posted April 5, 2008 Actually, yes, there is in fact a way.It's much more advanced though. This is just a more simple and basic way of doing it. By saying that I hope you mean with a script right? I've done a catapillar event system myself but I hadn't considered that there was a way of catapillering the events without the events being placed first. Could you show an example how to do this? My own system's here If you're able, would be able to help iron out a particular bug I have with it. It's when I make a catapillar train of 2 or more people, if the train is not all lined up the added event is de-synched from the others. It's quite differcult for me to automatically straighten everyone out. Also, this one's not as important, when you activate the first character while holding down the direction key (without first playing a message) the character will jump two spaces back instead of one. It seems a bit odd, that's all. Share this post Link to post Share on other sites
Arkbennett 16 Report post Posted April 5, 2008 By saying that I hope you mean with a script right? I've done a catapillar event system myself but I hadn't considered that there was a way of catapillering the events without the events being placed first. Could you show an example how to do this? My own system's here If you're able, would be able to help iron out a particular bug I have with it. It's when I make a catapillar train of 2 or more people, if the train is not all lined up the added event is de-synched from the others. It's quite differcult for me to automatically straighten everyone out. Also, this one's not as important, when you activate the first character while holding down the direction key (without first playing a message) the character will jump two spaces back instead of one. It seems a bit odd, that's all. No, no, entirely event based. Just incredible complex. I would have to tamper with it a bit. My computer is down right now, I'm hoping it to be repaired tomorrow. I will check your system tomorrow. When it comes to synching, normally you place the events right next to each other. And when you speak of the character jumping back two spaces, are you referring to your event system, or mine? Share this post Link to post Share on other sites
Breadfan 0 Report post Posted April 5, 2008 No, no, entirely event based. Just incredible complex. I would have to tamper with it a bit.My computer is down right now, I'm hoping it to be repaired tomorrow. I will check your system tomorrow. If you could gve me a starting point I'm sure I could follow it through. Right now I'm completely at a loss as to how an event can self create. I suppose it would be possible to instead use animated display images which appear as followers, those would carry on through each screen. I honestly don't care how complex it is, if it would save me from one of the biggest barriers of event system distribution, allowing others to easily implement them in thier games, I'm totally intrigued. When it comes to synching, normally you place the events right next to each other.And when you speak of the character jumping back two spaces, are you referring to your event system, or mine? Right, exept in a train of two or more people, your follower could be sitting on any number of surrounding spaces depending on the route you've taken. I've not properly had a look at how you've done your system, but how I have mine set up, on each detected tile move, a 'facing' variable is laddered down a variable group, each variable in the group is automatically assigned to every consecutive added event. Per move space, each event is told to move one space in the direction of that facing variable. Because the variable is laddered down the group, each consecutive event in the train is one movement behind the one in front. It makes it very differcult to locate the last character in the group, therefore impossible to place the events right next to each other. I suppose it's possible to do a train reset, re-place all the characters in the train in a line to the back of the player, then that would make it simple. The one problem I have with that, is that all the events in the train take exactly the same common event, and each event in the train is told to make a movement towards it's facing on every player movement. If I reset all of the variable in the laddered group, then all the event swould make a forward movement regardless of which direction the player moves. We would have lost communication with all the events in the train after the first. Does that make sense? It would be better if you had a look yourself. Share this post Link to post Share on other sites
Arkbennett 16 Report post Posted April 5, 2008 I believe the use of pictures would be the proper way to go. There are just some issues I've thought about, is the reason why I havn't bothered trying yet. I'm still wrapped up in my ABS system as well. As far as your lengthly description, your right, I'd best see it. But it sounds like your making things more complex then they need be. Perhaps. But that's just from personal experience. Share this post Link to post Share on other sites
Arkbennett 16 Report post Posted April 5, 2008 So, I'm looking at it, and wow. This is seriously overcomplicated. What are you trying to do, exactly? I mean: Are you trying to do anything more than make a catapiller script..? Share this post Link to post Share on other sites
Jesse66126 4 Report post Posted September 8, 2008 The caterpillar system I found looked good,but all it did was duplicate the player. Share this post Link to post Share on other sites
Kiriashi 117 Report post Posted September 30, 2008 ROFL! Before I found out there was a script for this kid of thing (and was stubborn and tried to learn everything without help all by myself :P) I made a mini gaem where this guy tells you to go collect some animals. So I made it when you pressed the action button the animal would follow you. And when you had all the animals following you, the popular song from Majora's Mask the Bremen's March song would play! :lol: (Yes the chickens were called cucos!) http://www.vgmusic.com/music/console/ninte..._March_Band.mid Share this post Link to post Share on other sites