Kingbry
2007.09.03, 01:27 PM
So this is a problem that has a lot to do with my understanding of how to work with the code taught to me in the Cocoa Game Workshop program Cocoa Quest.
so while going through the book I've been playing with things along the way so that I understand how things tick, but I've hit a fairly significant roadblock.
What I am trying to do is turn the Gate class that they've shown us into more of a "staircase" becauase the way the code works as is, you can only have one gate in the entire map, which greatly the level of complexity I can have in maps.
So say I have a staircase that goes from a map called "Second Floor" to a map called "Third Floor". I will have a corresponding staircase that goes from the "Third Floor" back to the "Second Floor". So what I want is for the capturing staircase to allow a player to preserve their position, when we change maps on them. That way, each map legend in the map.plist only needs two staircases - one for all the "up" stairs, and one for all the "down" stairs.
Now, I haven't even gotten to this point, but I do see a potential problem once all that gets solved... because the player's position will be standing on a staircase when the map changes, it might throw us into an endless loop of warping back and forth... but that's a fairly easy problem to solve... the easiest way would be to have the staircases locations slightly offset in the plist, or repurposing the code used to make sure that a spawned object goes in an open space to drop the player near the staircase, but not really on it.
Any help you can give me is GREATLY appreciated... I'm completely at a loss here.
so while going through the book I've been playing with things along the way so that I understand how things tick, but I've hit a fairly significant roadblock.
What I am trying to do is turn the Gate class that they've shown us into more of a "staircase" becauase the way the code works as is, you can only have one gate in the entire map, which greatly the level of complexity I can have in maps.
So say I have a staircase that goes from a map called "Second Floor" to a map called "Third Floor". I will have a corresponding staircase that goes from the "Third Floor" back to the "Second Floor". So what I want is for the capturing staircase to allow a player to preserve their position, when we change maps on them. That way, each map legend in the map.plist only needs two staircases - one for all the "up" stairs, and one for all the "down" stairs.
Now, I haven't even gotten to this point, but I do see a potential problem once all that gets solved... because the player's position will be standing on a staircase when the map changes, it might throw us into an endless loop of warping back and forth... but that's a fairly easy problem to solve... the easiest way would be to have the staircases locations slightly offset in the plist, or repurposing the code used to make sure that a spawned object goes in an open space to drop the player near the staircase, but not really on it.
Any help you can give me is GREATLY appreciated... I'm completely at a loss here.