DOLPHYBLUEDRAKE'S PROFILE

Search

[RM2K3] [Event Scripting] Problem Combining Caterpillar System With Ramps (updated with code)

I've been using a caterpillar common event script in rm2k3, but I can't get it to work properly with a Ramp system I also use to add a 3d feel to my maps. I keep getting freezes at the end of a ramp with the followers stuck partway up the ramp, or the followers fail to even climb the ramp at all. Some attempts have resulted in the followers moving to tiles where they're not supposed to be able to stand, then moving to the main leader's location and causing another freeze. Does anyone know how to get my systems to work together? I really want to get this to work, for this is a project I've been working on for years, and I've grown sick of this glitch.

Here are the event scripts for controlling the three followers when moving in compass directions (as in, when not on slopes):

(Note: all are parallel processes)

Follower 1 Controls:

@> Get Player Location: Variable [0097][0081][0082]
@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Conditional Branch: Variable [0089:Previous Hero X] != Variable [0081:Hero-X]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Variable [0090:Previous Hero Y] != Variable [0082:Hero-Y]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Switch [1019:Hero Moved] is ON
@> Control Switches: [1019:Hero Moved] = OFF
@> Get Player Location: Variable [0097][0089][0090]
@> Conditional Branch: Player is facing Up
@> Control Variables: [0082:Hero-Y] += 1
@>
: Branch End
@> Conditional Branch: Player is facing Down
@> Control Variables: [0082:Hero-Y] -= 1
@>
: Branch End
@> Conditional Branch: Player is facing Left
@> Control Variables: [0081:Hero-X] += 1
@>
: Branch End
@> Conditional Branch: Player is facing Right
@> Control Variables: [0081:Hero-X] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] < Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Move Right
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] > Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Move Left
@>
: Branch End
@> Conditional Branch: Variable [0084:Follower 1-Y] < Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0084:Follower 1-Y] > Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Up
@>
: Branch End
@>
: Branch End

Follower 2 Controls:

@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Control Variables: [0085:Follower 2-X] = [Follower 2]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [Follower 2]'s Y Coordinate
@> Conditional Branch: [Follower 1] is facing Up
@> Control Variables: [0084:Follower 1-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Down
@> Control Variables: [0084:Follower 1-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Left
@> Control Variables: [0083:Follower 1-X] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Right
@> Control Variables: [0083:Follower 1-X] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] < Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Right
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] > Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Left
@>
: Branch End
@> Conditional Branch: Variable [0086:Follower 2-Y] < Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0086:Follower 2-Y] > Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Up
@>
: Branch End

Follower 3 Controls:

@> Control Variables: [0085:Follower 2-X] = [Follower 2]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [Follower 2]'s Y Coordinate
@> Control Variables: [0087:Follower 3-X] = [Follower 3]'s X Coordinate
@> Control Variables: [0088:Follower 3-Y] = [Follower 3]'s Y Coordinate
@> Conditional Branch: [Follower 2] is facing Up
@> Control Variables: [0086:Follower 2-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Down
@> Control Variables: [0086:Follower 2-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Left
@> Control Variables: [0085:Follower 2-X] += 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Right
@> Control Variables: [0085:Follower 2-X] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] < Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Right
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] > Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Left
@>
: Branch End
@> Conditional Branch: Variable [0088:Follower 3-Y] < Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0088:Follower 3-Y] > Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Up
@>
: Branch End

As for the followers themselves, they are simple "touched by player" events that just swap places with the player when the player walks into them.

For the ramp system, I have 2 common events: one for a Northeast/Southwest ramp, and one for a Northwest/Southeast ramp:

Northeast/Southwest Ramp (Parallel Process, requires the switch "U-R/D-L Ramp" to be on):

@> Key Input Processing: [0003:Ramp Direction]
@> Conditional Branch: Variable [0003:Ramp Direction] == 2
@> Set Move Route: Player, Move Bottom Left
@>
: Branch End
@> Conditional Branch: Variable [0003:Ramp Direction] == 3
@> Set Move Route: Player, Move Upper Right
@>
: Branch End
@> Get Player Location: Variable [0097][0081][0082]
@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Conditional Branch: Variable [0089:Previous Hero X] != Variable [0081:Hero-X]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Variable [0090:Previous Hero Y] != Variable [0082:Hero-Y]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Switch [1019:Hero Moved] is ON
@> Control Switches: [1019:Hero Moved] = OFF
@> Get Player Location: Variable [0097][0089][0090]
@> Conditional Branch: Player is facing Up
@> Control Variables: [0082:Hero-Y] += 1
@>
: Branch End
@> Conditional Branch: Player is facing Down
@> Control Variables: [0082:Hero-Y] -= 1
@>
: Branch End
@> Conditional Branch: Player is facing Left
@> Control Variables: [0081:Hero-X] += 1
@> Control Variables: [0082:Hero-Y] -= 1
@>
: Branch End
@> Conditional Branch: Player is facing Right
@> Control Variables: [0081:Hero-X] -= 1
@> Control Variables: [0082:Hero-Y] += 1
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] != Variable [0081:Hero-X]
@> Conditional Branch: Variable [0083:Follower 1-X] < Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Turn Right, Move Upper Right
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] > Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Move Bottom Left, Turn Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0084:Follower 1-Y] < Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0084:Follower 1-Y] > Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Up
@>
: Branch End
@>
: Branch End
@>
: Branch End
@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Control Variables: [0085:Follower 2-X] = [Follower 2]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [Follower 2]'s Y Coordinate
@> Conditional Branch: [Follower 1] is facing Up
@> Control Variables: [0084:Follower 1-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Down
@> Control Variables: [0084:Follower 1-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Left
@> Control Variables: [0083:Follower 1-X] += 1
@> Control Variables: [0084:Follower 1-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Right
@> Control Variables: [0083:Follower 1-X] -= 1
@> Control Variables: [0084:Follower 1-Y] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] != Variable [0083:Follower 1-X]
@> Conditional Branch: Variable [0085:Follower 2-X] < Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Upper Right
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] > Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Bottom Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0086:Follower 2-Y] < Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0086:Follower 2-Y] > Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Up
@>
: Branch End
@>
: Branch End
@> Control Variables: [0085:Follower 2-X] = [Follower 2]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [Follower 2]'s Y Coordinate
@> Control Variables: [0087:Follower 3-X] = [Follower 3]'s X Coordinate
@> Control Variables: [0088:Follower 3-Y] = [Follower 3]'s Y Coordinate
@> Conditional Branch: [Follower 2] is facing Up
@> Control Variables: [0086:Follower 2-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Down
@> Control Variables: [0086:Follower 2-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Left
@> Control Variables: [0085:Follower 2-X] += 1
@> Control Variables: [0086:Follower 2-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Right
@> Control Variables: [0085:Follower 2-X] -= 1
@> Control Variables: [0086:Follower 2-Y] += 1
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] != Variable [0085:Follower 2-X]
@> Conditional Branch: Variable [0087:Follower 3-X] < Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Upper Right
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] > Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Bottom Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0088:Follower 3-Y] < Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0088:Follower 3-Y] > Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Up
@>
: Branch End
@>
: Branch End

Northwest/Southeast Ramp (Parallel Process, requires switch "U-L/D-R Ramp" to be on):

@> Key Input Processing: [0003:Ramp Direction]
@> Conditional Branch: Variable [0003:Ramp Direction] == 2
@> Set Move Route: Player, Move Upper Left
@>
: Branch End
@> Conditional Branch: Variable [0003:Ramp Direction] == 3
@> Set Move Route: Player, Move Bottom Right
@>
: Branch End
@> Get Player Location: Variable [0097][0081][0082]
@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Conditional Branch: Variable [0089:Previous Hero X] != Variable [0081:Hero-X]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Variable [0090:Previous Hero Y] != Variable [0082:Hero-Y]
@> Control Switches: [1019:Hero Moved] = ON
@>
: Branch End
@> Conditional Branch: Switch [1019:Hero Moved] is ON
@> Control Switches: [1019:Hero Moved] = OFF
@> Get Player Location: Variable [0097][0089][0090]
@> Conditional Branch: Player is facing Up
@> Control Variables: [0082:Hero-Y] += 1
@>
: Branch End
@> Conditional Branch: Player is facing Down
@> Control Variables: [0082:Hero-Y] -= 1
@>
: Branch End
@> Conditional Branch: Player is facing Left
@> Control Variables: [0081:Hero-X] += 1
@> Control Variables: [0082:Hero-Y] += 1
@>
: Branch End
@> Conditional Branch: Player is facing Right
@> Control Variables: [0081:Hero-X] -= 1
@> Control Variables: [0082:Hero-Y] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] != Variable [0081:Hero-X]
@> Conditional Branch: Variable [0083:Follower 1-X] < Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Turn Right, Move Bottom Right
@>
: Branch End
@> Conditional Branch: Variable [0083:Follower 1-X] > Variable [0081:Hero-X]
@> Set Move Route: [Follower 1], Turn Left, Move Upper Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0084:Follower 1-Y] < Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0084:Follower 1-Y] > Variable [0082:Hero-Y]
@> Set Move Route: [Follower 1], Move Up
@>
: Branch End
@>
: Branch End
@>
: Branch End
@> Control Variables: [0083:Follower 1-X] = [Follower 1]'s X Coordinate
@> Control Variables: [0084:Follower 1-Y] = [Follower 1]'s Y Coordinate
@> Control Variables: [0085:Follower 2-X] = [Follower 2]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [Follower 2]'s Y Coordinate
@> Conditional Branch: [Follower 1] is facing Up
@> Control Variables: [0084:Follower 1-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Down
@> Control Variables: [0084:Follower 1-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Left
@> Control Variables: [0083:Follower 1-X] += 1
@> Control Variables: [0084:Follower 1-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 1] is facing Right
@> Control Variables: [0083:Follower 1-X] -= 1
@> Control Variables: [0084:Follower 1-Y] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] != Variable [0083:Follower 1-X]
@> Conditional Branch: Variable [0085:Follower 2-X] < Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Upper Right
@>
: Branch End
@> Conditional Branch: Variable [0085:Follower 2-X] > Variable [0083:Follower 1-X]
@> Set Move Route: [Follower 2], Move Bottom Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0086:Follower 2-Y] < Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0086:Follower 2-Y] > Variable [0084:Follower 1-Y]
@> Set Move Route: [Follower 2], Move Up
@>
: Branch End
@>
: Branch End
@> Control Variables: [0085:Follower 2-X] = [EV0283]'s X Coordinate
@> Control Variables: [0086:Follower 2-Y] = [EV0283]'s Y Coordinate
@> Control Variables: [0087:Follower 3-X] = [Follower 3]'s X Coordinate
@> Control Variables: [0088:Follower 3-Y] = [Follower 3]'s Y Coordinate
@> Conditional Branch: [Follower 2] is facing Up
@> Control Variables: [0086:Follower 2-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Down
@> Control Variables: [0086:Follower 2-Y] -= 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Left
@> Control Variables: [0085:Follower 2-X] += 1
@> Control Variables: [0086:Follower 2-Y] += 1
@>
: Branch End
@> Conditional Branch: [Follower 2] is facing Right
@> Control Variables: [0085:Follower 2-X] -= 1
@> Control Variables: [0086:Follower 2-Y] -= 1
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] != Variable [0085:Follower 2-X]
@> Conditional Branch: Variable [0087:Follower 3-X] < Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Bottom Right
@>
: Branch End
@> Conditional Branch: Variable [0087:Follower 3-X] > Variable [0085:Follower 2-X]
@> Set Move Route: [Follower 3], Move Upper Left
@>
: Branch End
@>
: Else
@> Conditional Branch: Variable [0088:Follower 3-Y] < Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Down
@>
: Branch End
@> Conditional Branch: Variable [0088:Follower 3-Y] > Variable [0086:Follower 2-Y]
@> Set Move Route: [Follower 3], Move Up
@>
: Branch End
@>
: Branch End

As for the ramps on the map, they also have events: simple player touch events like these:

Getting on NE/SW Ramp:

@> Control Switches: [0993:U-R/D-L Ramp] = ON

Getting off NE/SW Ramp:

@> Control Switches: [0994:U-L/R-D Ramp] = OFF

Getting on NW/SE Ramp:

@> Control Switches: [0994:U-L/R-D Ramp] = ON

Getting off NW/SE Ramp:

@> Control Switches: [0994:U-L/R-D Ramp] = OFF

Please help me figure out what I'm doing wrong. I really want to blend these two systems together for an amazing experience for the player.
Pages: 1