Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
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
»
How do i make a catarpillar system?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How do i make a catarpillar system? (Read 1853 times)
Ride32
Member
Initiate
Posts: 7
Um.....Dounuts?
How do i make a catarpillar system?
«
on:
January 14, 2007, 02:55:51 AM »
I seached really hard and i cant get any to work and telleport to the place i want it to go with me.
Logged
DOOOOD!!!!!!!
Glitch
White Phoenix of the Crown
Associate
Posts: 262
I can be a bit bipolar, when I get mad I tend to do, things
(No subject)
«
Reply #1 on:
January 14, 2007, 02:04:07 PM »
This should go in tutorials. Likewise, the answer may be in the request area (though i'm not sure if we have a tutorial on Cat systems in their...) If we don't have one then I would suggest gaming world, they usually have some pretty good tutorials.
Logged
Nuf Said.
thepsynergist
Kupo!
Associate
Posts: 159
I enjoy video game programming, as well as any and all RPG's
(No subject)
«
Reply #2 on:
January 16, 2007, 04:22:27 AM »
This is the Catipillar Tut that I found while surfing GamingWorlds.net
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.
Logged
Register me in your Pal Pad in Diamond/Pearl!
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
How do i make a catarpillar system?