Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Need help and sorry if it doesn't belong here.
« previous next »
  • Print
Pages: [1]

Author Topic: Need help and sorry if it doesn't belong here.  (Read 2387 times)

Offline Cloud_Guardian

  • Tales of symphonia maniac
  • Initiate
  • *
  • Posts: 26
  • ...Maniac for ToS
Need help and sorry if it doesn't belong here.
« on: July 25, 2005, 07:57:21 PM »
Uh, how do you make it so a person follows you and doesn't drift
off?
Logged
I am way against not doing the
Impossible. I am also against
assumptions. Don't assume I have
not almost beaten ToS! (which I
have, I'm just stuck)

Offline Deathreaper

  • Acolyte
  • *
  • Posts: 492
  • Power Absolute
I got this from gaming world
« Reply #1 on: July 25, 2005, 08:23:31 PM »
Here this is a tutorial I found on Gaming world.
Hi there, as you know a "caterpillar" system is one where the heroes follow behind your main character. To tell the truth, not many are both easy and effective. But hey, this one is. Also, I will only do this with one hero "hero2". So read up! This tutorial requires knowledge of variables, x/y coordinates, and fork conditions.

Ok, to start off with, you will need one more hero so do that in your database now. Next you need to make 2 maps but DO NOT add any events yet. You will also need 4 variables listed here.
V1-HeroX
V2-HeroY
V3-Hero2X
V4-Hero2Y

You also need two events
Ev1-Set Hero2
Ev2-Hero2

Now, set each one to a parallel process and check "If hero whoever(hero2 in this case) is in the party". Now this first
event sets the hero to your position. Also if hero2 is in the party on the first event only works if hero 2 is in the party. Now for the code. First go to variable operations and set HeroX to Sprite Hero X Coordinate. Now set HeroY to Sprite Hero Y Coordinate. Now after that have a move event for your Hero2 event that has phasing mode on. Now have a change Event location hero2 to the location referenced in variables HeroX and HeroY. Now have erase event.So what does this do? Simple. The Set Hero X/Y coordinates to the variables tracks the hero. The phasing mode acts as so the Hero2 can be on your hero and not freeze. The change event role is key in this because you have to change the event location to hero and you do not want it to freeze. The change event location just sets Hero2 to your location.The erase event, well erases the event. Why not a switch? Because with an erase event the event automatically brings the event back when you leave so basically it is reset.
Now here is what the code should look like.

<>Variable Oper:[????:HeroX] Set, Hero X Coord.
<>Variable Oper:[????:HeroY] Set, Hero Y Coord.
<>Move Event: Hero2, Phasing Mode ON
<>Change Event Location: Hero2,(V[????],V[????])
<>Erase Event

This is what the code should look like. Now, the ???? represents the variable value of whatever number you used.
Now on to the second event which is your hero2. The box if hero2 is in the party should be checked. Also parallel process and same layer as hero. Also MAKE SURE that the move frequency is Normal. This is so when he follows the hero, that he can keep up with him. Now for the event part.
You first need to set the coordinates again. HeroX equals Hero X Coordinate and HeroY equals Hero Y Coordinate. Now do the same with Hero2. Hero2X Set Hero2 X Coordinate and Hero2Y set Hero2 Y coordinate. Now you need to set it so the event knows where to walk and how to follow the hero. This part is important so listen well. Oh and first I tell what it does, THEN I explain. Now click on a fork conditon that states if HeroX is greater than Hero2X. No else case for any of these forks BTW. Now INSIDE the fork have a move event for Hero2 that has Phasing Mode OFF then Move Right.
Now lets have another fork for if HeroX is less than Hero2X.
In the fork have a Phasing Mode OFF and move left. Now for the up and down forks. Have a fork now that states if HeroY is greater than Hero2Y,inside the fork have phasing mode OFF and move down for Hero2 again. Now, the last fork, have one that says if HeroY is less than Hero2Y then Hero2 moves Phasing mode OFF and Up. That is the end!! Now for an explanation......First the Setting the variables(X and Y coordinate variables) to the Hero and Hero2 simply tracks them. Now for the forks. The If Hero X is greater, which means he is too the right of Hero2, then Hero2 moves right.
Now the opposite applies for the others, if HeroX is LESS than Hero2X which means that he is too the left then Hero2 moves left. Now the HeroY is greater means he is below hero2
so Hero2 moves down. Finally if HeroY is less than Hero2Y then he is above and Hero2 moves up. Oh, and the phasing mode turned OFF means so you can not walk over him anymore.
Now for the actual code

<>Variable Oper: [????:HeroX] Set, Hero X Coord.
<>Variable Oper: [????:HeroY] Set, Hero Y Coord.
<>Variable Oper: [????:Hero2X] Set, Hero2 X Coord.
<>Variable Oper: [????:Hero2Y] Set, Hero2 Y Coord.
<>Branch if Var [????:HeroX] is V[????] Greater
<>Move Event: Hero2, Phasing Mode OFF, Move Right
<>
:End
<>Branch if Var [????:HeroX] is V[????] Less
<>Move Event: Hero2, Phasing Mode OFF, Move Left
<>
:End
<>Branch if Var [????:HeroY] is V[????] Greater
<>Move Event: Hero2, Phasing Mode OFF, Move Down
<>
:End
<>Branch if Var [????:HeroY] is V[????] Less
<>Move Event: Hero2, Phasing Mode OFF, Move Up
<>
:End

Now you are "ALMOST" done!! So, now you got your two events.
Let me say this clearly "THESE EVENTS SHOULD BE THE FIRST EVENTS WHERE YOUR CATERPILLAR SYSTEM IS AT" If not then the events will be messed up. NOW, after the first map, the Hero2 Event should be FIRST, followed by the Set Hero2 event. Now that is all for the events.

I will later have how to implement more than one Hero and even have a sample game In part 2 of the caterpillar system.Best of luck with your game and oh yeah, if you use this then please give credit where it is due.Oh and please, if you see a bug or this tut does not work then please post a comment saying so. Thanks and the best of luck with your game!!
Logged
\\\\\\\"Was that enough for you or should I kill another one of your friends for you to get the point?\\\\\\\" - Younger Toguro

Offline Chaotic_Death

  • omgggggg
  • Associate
  • *
  • Posts: 251
(No subject)
« Reply #2 on: July 26, 2005, 03:30:09 PM »
Forget coding, just use Rusty's Caterpillar system.
http://www.elavismo.avalonsmist.com/tlozeott/Caterpillar%20System.zip

Using This in Your Game

- Open up the example game in RPG Maker 2000 (or 2003).

- Select 'Map 1'.  (It doesn't really matter if you select Map 2 or Map 3 as they are practically the same)

- You will notice that there are 4 events in the top right hand corner.  This is the caterpillar system.  These 4 events must be on EVERY single map you wish the caterpillar effect to take place (unless, of course, you edit it so that there are only 3 members in your party etc).  Also, not only must they be on every map, they must be the first 4 events on every map, and must be placed in order from left (first) to right (last).  This is because RPG Maker does not identify events as names, they identify them as numbers.  So the event 'Caterpillar System' will be given the number 1 by RPG Maker, and the event 'Hero 2' the number 2 etc.  The caterpillar system will only work if each of the events is identified correctly; so, for example, if you make a town, make all the doors as events, then add the caterpillar system, you will have doors following you around instead of heroes!!!

- So, for the caterpillar system to work, you must copy these four events from the example game and paste them into your own game. Remember: they must be the first four events you place on every map you wish the caterpillar system to take effect!

- Now, change the graphics of the event 'Hero 2' to be your hero 2 graphic, and event 'Hero 3 to be your hero 3 graphic etc.

And... that's it! You should have a working caterpillar system!
Logged
Once I think of something to put here... I will.

Offline gael

  • Member
  • Initiate
  • *
  • Posts: 25
  • I'm just an 18 year old loser boy.
(No subject)
« Reply #3 on: July 20, 2006, 09:34:58 PM »
Oh Yeah! Hey  :guns: chaotic death (by the way that name is so freakin deep and cool and awshome I wish I wash jush like yoush) the link doesn’t even work you ***. Thanks you’re a real big help. Uhhhhhh NOT!  [GLOW][/GLOW]  [GLOW]OMFG! STFU![/GLOW]  
Logged

Offline Grandy

  • Zombie
  • Royal
  • *
  • Posts: 4,989
  • Not actually dead
(No subject)
« Reply #4 on: July 20, 2006, 09:55:47 PM »
 You missed a year by 6 days.
Logged
Quote from: Alex
I general I'd say I agree 98% with Grandy's post above.

Offline Meiscool-2

  • Sage
  • *
  • Posts: 7,030
  • If you support n00bs, you support communism.
(No subject)
« Reply #5 on: July 20, 2006, 09:56:09 PM »
Look at the posting date. This topic is almost a year old. You made a year-long kick. Use some common sense.
Logged
Most Recent:

________________________
Old Stuff:

Offline WarxePB

  • Action Sue
  • Royal
  • *
  • Posts: 3,601
  • What killed the dinosaurs?
    • The Gigaverse
(No subject)
« Reply #6 on: July 20, 2006, 10:59:37 PM »
Yeah, you get the point.

LOCKED
Logged
Blog: The Gigaverse
Twitter: Initial Chaos

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Need help and sorry if it doesn't belong here.
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum