Syndicate content

Map ID stored in 2 variables = consufion for me

1 post / 0 new
egg_dragon's picture
Offline
Ultra TownieMega TownieSuper TownieGreat TownieTownie
Joined: 23 Oct 2005
Map ID stored in 2 variables = consufion for me

Okay, I'm trying to create a party switch system reminescent of FF6 and it works pretty well except one thing: if the parties are on separate maps, switching from one to another will put both parties on the current map.

For example,
let's say Bob's party is on map A and Fred' party is on map B. If I'm controlling Bob's party and switch to Fred's party, the switch is made but Fred's party is now on map A with Bob's party! Fred's party should still be on map B! WTF?!

I have six variables: Party 1 X Position, Party 1 Y Position and Party 1 Map ID and those same three for Party 2. Well, here is what the code looks like:

====================================================
<>Conditional Branch: Key Z pushed
<>Conditional Branch: Variable [0001: Party Control] == 1
<>Variable: [0002: Party 1 X Position] = Player X Coords
<>Variable: [0003: Party 1 Y Position] = Player Y Coords
<>Variable: [0006: Party 1 Map ID] = Map ID
<>Change Party Members: Remove [Cyrus]
<>There are more Change Party Members commands but
they are irrelevant to my problem, as far as I know!
<>Teleport: By Variables [0007][0004][0005] (Party 2 Map ID,
Party 2 X Position and
Party 2 Y Position)
<>Wait: 20 Frames
<>Variable: [0001: Party Control] = 2
: Else Handler
<>Conditional Branch: Variable [0001: Party Control] == 2
<>Variable: [0004: Party 2 X Position] = Player X Coords
<>Variable: [0005: Party 2 Y Position] = Player Y Coords
<>Variable: [0007: Party 2 Map ID] = Map ID
<>Change Party Members: Remove [Blain]
<>Again, more Change Party Members commands but just
the reverse of above.
<>Teleport: By Variables [0006][0002][0003] (Party 1 Map ID,
Party 1 X Position and
Party 1 Y Position)
<>Wait: 20 Frames
<>Variable: [0001: Party Control] = 1
<>
: End
<>
: End
<>
: End
<>Wait: 4 Frames
<>
==================================================

Does anyone see anything wrong with this? Since the two variables for the party map ID's are set at separate times on different maps, shouldn't they hold separate values? Why does it teleport the party not being used to the current map, instead of teleporting the player to that map?

I'm confused. Any help would be so greatly appreciated. Heck, I'll even throw in a point for anyone who helps me! Laugh

EDIT: Okay, now it's even worse. I don't know what is different in that code above from the one I was using in my old game, but now instead of teleporting the new party to the current map, the game teleports to the right map (thank God!) but teleports immediately back to the current map and without changing the party members (screw you God!) *thunder rolls* (only kidding!) What the hell is going on?

EDIT: Alright. I figured out what the problem was with teleporting to the map and switching back quickly. I made the corrections above and listed them below:

<>Variable: [0001: Party Control] = 2
<>Variable: [0001: Party Control] = 1

These were near the begining of the two conditional branches, but I moved them to the end with a 1 second wait to give them the event time to process the information and teleport to the right map. But it doesn't fix the original problem: switching between parties puts them both on the same map if they're on separate maps to begin with.

EDIT: NO suggestions at all?! Damn. This really, really blows. Oh well. Guess my whole multiple party system is gonna kinda suck. Instead of being able to switch back and forth between the parties you'll have to complete the goal with one party entirely before getting to control the other party. It's gonna have to be a 'fixed' system, which is really lame.

Who's online

There are currently 0 users and 4 guests online.