Gw Temp

Menu

Tutorial - 'Advanced Caterpillar Effect for RPGM2K' by FantasyGames2k

An item about RPGMaker 2000 posted on

Blurb

A nice tutorial about characters joining parties in a "caterpillar" effect.

Body

Advanced Caterpillar Effect for RPGM2K By: FantasyGames2k

This tutorial is assuming that one will have more then just 4 characters thru out their game... It has added to it the opurrtunity to add characters to your party in the order you want with out having to sit there and change evrythign manually... Meaning... you have 20 characters you can have on you team but you only can choose 4 so.... You select the 4 you want in any order... and now you want the teleport to work for ya as well so they are always there.....

Variable 0001: Party Count

Make On a map Events 1-3 ( ALWAYS) NPC1Follow, NPC2Follow, NPC3Follow
We will edit these events after we make our common events

First Make The Common Events NPC1, NPC2, NPC3
in teh next code just subsatue hero for npc1 and so on when you go to teh next part...
(This is assuming the very first three events on you maps will be NPC1Follow, NPC2Follow, NPC3Follow)

-----------------------------------------------------------------------------------------------
CommonEvent[0001:NPC1]

Parrelle Proccess - Appearance Condition - NPC1Follow

If Switch - NPC1Follow ON ( make sure you use else case on this one ONLY )
-Loop
--Wait 0.0sec
--Change Variable[0002:HeroX] (Set) - Hero's X Pos.
--Change Variable[0003:HeroY] (Set) - Hero's Y Pos.
--Change Variable[0004:NPC1X] (Set) - NPC1Follow's X Pos.
--Change Variable[0005:NPC1Y] (Set) - NPC1Follow's Y Pos.

Note: Setting Directions North/South/West/East
(This part is so the npc will always be beihnd the hero no matter which way he faces)

--If Hero===> Up (Direction)
---Change Variable[0005:NPC1Y] (-)- 1
--End Case
--If Hero===> Down (Direction)
---Change Variable[0005:NPC1Y] (+)- 1
--End Case
--If Hero===> Left (Direction)
---Change Variable[0004:NPC1X] (-)- 1
--End Case
--If Hero===> Right (Direction)
---Change Variable[0004:NPC1X} (+)- 1
--End Case

Note: Slip Through allows Hero to walk over the ones following him so he will never get trapped only draw back is you slip through walls and things like that as well

( his is fork condition the first variable should be the heroy the second one should be npc1y with the option smaller)
--If Var[0003:HeroY] Var[0005] (<)
---Move Event: NPC1Follow -Start Slip Through-Up
--End Case
(Bigger)
--If Var[0003:HeroY] Var[0005] (>)
---Move Event: NPC1Follow -Star Slip Through-Down
--End Case
--If Var[0002:HeroX] Var[0004] (<)
---Move Event: NPC1Follow -Start Slip Through-Left
--End Case
--If Var[0002:HeroX] Var[0004] (>)
---Move Event: NPC1Follow -Start Slip Through-Right
--End Case
-End Loop
Else Case
End Case
-----------------------------------------------------------------------------------------------
CommonEvent[0002:NPC2]

Parrelle Proccess - Appearance Condition - NPC2Follow

If Switch - NPC2Follow ON ( make sure you use else case on this one ONLY )
-Loop
--Wait 0.0sec
--Change Variable[0004:NPC1X] (Set) - NPC1Follow's X Pos.
--Change Variable[0005:NPC1Y] (Set) - NPC1Follow's Y Pos.
--Change Variable[0006:NPC2X] (Set) - NPC2Follow's X Pos.
--Change Variable[0007:NPC2Y] (Set) - NPC2Follow's Y Pos.

Note: Setting Directions North/South/West/East

--If NPC1Follow===> Up (Direction)
---Change Variable[0007:NPC2Y] (-)- 1
--End Case
--If NPC1Follow===> Down (Direction)
---Change Variable[0007:NPC2Y] (+)- 1
--End Case
--If NPC1Follow===> Left (Direction)
---Change Variable[0006:NPC2X] (-)- 1
--End Case
--If NPC1Follow===> Right (Direction)
---Change Variable[0006:NPC2X} (+)- 1
--End Case

Note: Slip Through allows Hero to walk over the ones following him so he will never get trapped only draw back is you slip through walls and things like that as well

--If Var[0005:NPC1Y] Var[0007] (<)
---Move Event: NPC1Follow -Start Slip Through-Up
--End Case
--If Var[0005:NPC1Y] Var[0007] (>)
---Move Event: NPC1Follow -Star Slip Through-Down
--End Case
--If Var[0004:NPC1X] Var[0006] (<)
---Move Event: NPC1Follow -Start Slip Through-Left
--End Case
--If Var[0004:NPC1X] Var[0006] (>)
---Move Event: NPC1Follow -Start Slip Through-Right
--End Case
-End Loop
Else Case
End Case

-----------------------------------------------------------------------------------------------
CommonEvent[0003:NPC3]

Parrelle Proccess - Appearance Condition - NPC3Follow

If Switch - NPC2Follow ON ( make sure you use else case on this one ONLY )
-Loop
--Wait 0.0sec
--Change Variable[0006:NPC2X] (Set) - NPC2Follow's X Pos.
--Change Variable[0007:NPC2Y] (Set) - NPC2Follow's Y Pos.
--Change Variable[0008:NPC3X] (Set) - NPC3Follow's X Pos.
--Change Variable[0009:NPC3Y] (Set) - NPC3Follow's Y Pos.

Note: Setting Directions North/South/West/East

--If NPC2Follow===> Up (Direction)
---Change Variable[0009:NPC3Y] (-)- 1
--End Case
--If NPC2Follow===> Down (Direction)
---Change Variable[0009:NPC3Y] (+)- 1
--End Case
--If NPC2Follow===> Left (Direction)
---Change Variable[0008:NPC3X] (-)- 1
--End Case
--If NPC2Follow===> Right (Direction)
---Change Variable[0008:NPC3X} (+)- 1
--End Case

Note: Slip Through allows Hero to walk over the ones following him so he will never get trapped only draw back is you slip through walls and things like that as well

--If Var[0007:NPC2Y] Var[0009] (<)
---Move Event: NPC1Follow -Start Slip Through-Up
--End Case
--If Var[0007:NPC2Y] Var[0009] (>)
---Move Event: NPC1Follow -Star Slip Through-Down
--End Case
--If Var[0006:NPC2X] Var[0008] (<)
---Move Event: NPC1Follow -Start Slip Through-Left
--End Case
--If Var[0006:NPC2X] Var[0008] (>)
---Move Event: NPC1Follow -Start Slip Through-Right
--End Case
-End Loop
Else Case
End Case

-----------------------------------------------------------------------------------------------

Back on the map we are now going to edit events NPC1Follow, NPC2Follow, NPC3Follow
Before we start go ahead and go to teh npc1 event and set all your variables first
Alisa1, Alisa2,Alisa3, Edo1, Edo2, Edo3, and so on You need three variable for each hcraters so if you have 11 chracters you are using 33 variables total... I am useing variable I like em better then switches....
-----------------------------------------------------------------------------------------------
Event[0001:NPC1Follow]

The First Page is Blank and set to below hero with even condition set as Switch[0001:NPC1Follow1] ON

Now add a page for each addtional character you may have through out the game - For me it was 11)

Page 2 -
Event Condtions
Var[0010:Alisa1] above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal

Page3
Same thing but with a new character Example
Var[0013:Edo1]Above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal
-----------------------------------------------------------------------------------------------
Event[0002:NPC2Follow]

The First Page is Blank and set to below hero with even condition set as Switch[0002:NPC2Follow1] ON

Now add a page for each addtional character you may have through out the game - For me it was 11)

Page 2 -
Event Condtions
Var[0011:Alisa2] above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal

Page3
Same thing but with a new character Example
Var[0014:Edo2]Above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal
-----------------------------------------------------------------------------------------------
Event[0003:NPC3Follow]

The First Page is Blank and set to below hero with even condition set as Switch[0003:NPC3Follow1] ON

Now add a page for each addtional character you may have through out the game - For me it was 11)

Page 2 -
Event Condtions
Var[0012:Alisa3] above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal

Page3
Same thing but with a new character Example
Var[0015:Edo3]Above1
With the Graphic set as the Character
Condtion is Auto Start and same Level as Hero with movement set to normal
-----------------------------------------------------------------------------------------------
I tried only using on variable for each character but it didn't work when I added the second character the first npc follow turned into teh same as the NPC2
-----------------------------------------------------------------------------------------------

Finally Make an event for very character possible.... this will start the long and hideous process... :-)

Examples - Alisa, Edo, Helius, Draggo
(here you should make 3 variables for each character for each possible postion they can have I used Alisa1, Alisa2, Alisa3 you could use switches but I thought variables musch easier

Event - Alisa - Page One

Msg: May I join you?
-Show Choice: Yes/No
--Yes Case: -
---Fork Option:(0001:Party Count) 0
----Change Variable:[0001:Party Count] (+)- 1
----Change Variable:[0010:Alisa1] (+)- 1
----Change Hero's Party - (Alisa) (Add)
----Swap Event: This Event with [0001:NPC1Follow]
---Else case
----Fork Option:(0001:Party Count) 1
-----Change Variable:[0001:Party Count] (+)- 1
-----Change Variable:[0011:Alisa2] (+)- 1
-----Change Hero's Party - (Alisa) (Add)
-----Swap This Event with [0002:NPC2Follow]
----Else case
-----Fork Option:(0001:Party Count) 2
------Change Variable:[0001:Party Count] (+)- 1
------Change Variable:[0012:Alisa3] (+)- 1
------Change Hero's Party - (Alisa) (Add)
------Swap This Event with [0003:NPC3Follow]
-----Else case
------Fork Option:(0001:Party Count) 3
-------Message: Sorry there are already people following you.
------End case
-----End case
----End case
---End Case
--NO Case
---Message: Your Choice!
-End Case

Page Two

Event Condition Var[0010:Alisa1] Above 1
Blank and change grpahic to nothing....

Page Three

Event Condition Var[0011:Alisa2] Above 1
Blank and change grpahic to nothing....

Page Four

Event Condition Var[0012:Alisa3] Above 1
Blank and change grpahic to nothing....

-----------------------------------------------------------------------------------------------

Event - Edo - Page One

Msg: May I join you?
-Show Choice: Yes/No
--Yes Case: -
---Fork Option:(0001:Party Count) 0
----Change Variable:[0001:Party Count] (+)- 1
----Change Variable:[0013:Edo1] (+)- 1
----Change Hero's Party - (Edo) (Add)
----Swap Event: This Event with [0001:NPC1Follow]
---Else case
----Fork Option:(0001:Party Count) 1
-----Change Variable:[0001:Party Count] (+)- 1
-----Change Variable:[0014:Edo2] (+)- 1
-----Change Hero's Party - (Edo) (Add)
-----Swap This Event with [0002:NPC2Follow]
----Else case
-----Fork Option:(0001:Party Count) 2
------Change Variable:[0001:Party Count] (+)- 1
------Change Variable:[0015:Edo3] (+)- 1
------Change Hero's Party - (Edo) (Add)
------Swap This Event with [0003:NPC3Follow]
-----Else case
------Fork Option:(0001:Party Count) 3
-------Message: Sorry there are already people following you.
------End case
-----End case
----End case
---End Case
--NO Case
---Message: Your Choice!
-End Case

Page Two

Event Condition Var[0013:Edo1] Above 1
Blank and change grpahic to nothing....

Page Three

Event Condition Var[0014:Edo2] Above 1
Blank and change grpahic to nothing....

Page Four

Event Condition Var[0015:Edo3] Above 1
Blank and change grpahic to nothing....

-----------------------------------------------------------------------------------------------
Event - Helius - Page One

Msg: May I join you?
-Show Choice: Yes/No
--Yes Case: -
---Fork Option:(0001:Party Count) 0
----Change Variable:[0001:Party Count] (+)- 1
----Change Variable:[0016:Helius1] (+)- 1
----Change Hero's Party - (Helius) (Add)
----Swap Event: This Event with [0001:NPC1Follow]
---Else case
----Fork Option:(0001:Party Count) 1
-----Change Variable:[0001:Party Count] (+)- 1
-----Change Variable:[0017:Helius2] (+)- 1
-----Change Hero's Party - (Helius) (Add)
-----Swap This Event with [0002:NPC2Follow]
----Else case
-----Fork Option:(0001:Party Count) 2
------Change Variable:[0001:Party Count] (+)- 1
------Change Variable:[0018:Helius3] (+)- 1
------Change Hero's Party - (Helius) (Add)
------Swap This Event with [0003:NPC3Follow]
-----Else case
------Fork Option:(0001:Party Count) 3
-------Message: Sorry there are already people following you.
------End case
-----End case
----End case
---End Case
--NO Case
---Message: Your Choice!
-End Case

Page Two

Event Condition Var[0016:Helius1] Above 1
Blank and change grpahic to nothing....

Page Three

Event Condition Var[0017:Helius2] Above 1
Blank and change grpahic to nothing....

Page Four

Event Condition Var[0018:Helius3] Above 1
Blank and change grpahic to nothing....

-----------------------------------------------------------------------------------------------

OKay REMEMBER This COnditions

NPC1Follow, NPC2Follow, NPC3 Follow MUST ALWAYS be the First 3 EVents on you Maps
-----------------------------------------------------------------------------------------------

BONUS CODE: Teleports and Making NPC appear there after screen comes back
This is actually a cheating way... but what you do everytime you make a teleport

make two pages... One for nomral Teleport, and one for an NPC teleport....

Page one have your teleport as normal....

Page Two - make Teleport Condition Switch NPC1Follow ON
and have it turn ona switch ( for example ) Teleport1

Erase Screen: ( what ever transition you want ) then have teleport
_______________________________________________________________________
NOW you need an extra event on each map called Teleport Watcher

Page1

Event Conditions - NPC1Follow1ON ( we only watch for this event cause unless you have npc1follow on then npc2 follow wont' be on )

Now with in that teleport watch you have a page for each possible teleport for that map like if you in a town map you would have a good 15 pages of possible teleports...

Page 2

Event Condtions - Teleport1 ON ( this is because there can be mulitple teleports to one map)

Teleport Event: [0001:NPC1Follow] - To teleport location of you choice
Note: Now since you wanna save on game speed you only want thigns following you that you are using so now you throw in you other forck options for events NPC2Follow and NPC3Follow

If Switch: [0002NPC2Follow] On
Teleport event to location
End case

If Switch: [0003:NPC3Follow] On
Teleport event to location
End case

Note: Now since you have Teleport1 Erase the screen now you have to get this telewatch to show the screen

Show Screen - Transition as you like

Note: now make sure you turn the switch teleport1 off so you don't go in an infinate loop

Switch Switch Teleport1 - Off

now for each teleport you have you do the same thign making it go to whereever the teleport wants to go....

Any questions ask me...
Email:nexusconti@hotmail.com
AIM: JoshMEW
ICQ: 107152469